countrySections property
A list of the countries the route runs through.
The sections cover the whole route in start to end order, so a section ends where the next one starts and the last one ends at the route length.
Returns
- A
List<CountrySection>in route start to end order, one entry per country crossed.
See also:
- RouteSegmentBase.countrySections - Country sections per segment.
Implementation
List<CountrySection> get countrySections {
final OperationResult resultString = objectMethod(
pointerId,
'RouteBase',
'getCountrySections',
);
final List<dynamic> countrySectionsJson = resultString['result'];
return countrySectionsJson
.map((dynamic e) => CountrySection.fromJson(e))
.toList();
}