tollSections property

List<TollSection> get tollSections

A list of tolled sections that occur along the route.

Each TollSection describes the start/end distances (in metres from route start), the cost and the currency (if available).

Returns

  • A List<TollSection> containing toll sections; when no tolls are present the list will be empty.

Implementation

List<TollSection> get tollSections {
  final OperationResult resultString = objectMethod(
    pointerId,
    'RouteBase',
    'getTollSections',
  );

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

  return tollSectionsJson
      .map((final dynamic e) => TollSection.fromJson(e))
      .toList();
}