borders property
List<WorldCountry> ?
get
borders
Returns an unmodifiable list of WorldCountry objects representing the countries that share a land border with this country.
If the bordersCodes property of the WorldCountry object is null or
empty, returns null. Otherwise, returns an unmodifiable list of
WorldCountry objects representing the countries whose code property is
present in the bordersCodes list.
Implementation
List<WorldCountry>? get borders {
final codes = bordersCodes;
if (codes == null || codes.isEmpty) return null;
return List.unmodifiable(codes.map(WorldCountry.fromCode));
}