ferrySections property

List<FerrySection> get ferrySections

Sections contained in this segment on which the vehicle is carried over.

Each FerrySection describes the start/end distances (in meters from route start) and whether the vehicle is carried on a vessel or on a train shuttle.

Returns

  • List<FerrySection>: ferry sections in start to end order. Empty when the segment uses no ferry.

See also:

Implementation

List<FerrySection> get ferrySections {
  final OperationResult resultString = objectMethod(
    pointerId,
    'RouteSegmentBase',
    'getFerrySections',
  );

  final List<dynamic> ferrySectionsJson = resultString['result'];

  return ferrySectionsJson
      .map((dynamic e) => FerrySection.fromJson(e))
      .toList();
}