regionsIn method
Returns the region matching id
and all regions it contains, if any.
If passing true
for strict
, an exact match will not be included.
Implementation
List<RegionFeature> regionsIn(dynamic id, [bool strict = false]) {
final region = regionForID(id);
if (region == null) return [];
final List<RegionFeature> result = [];
if (!strict) result.add(region);
for (final memberId in region.members) {
result.add(regionsByCode[memberId]!);
}
return result;
}