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