getAsGeoData method

GeoData getAsGeoData(
  1. K key, [
  2. GeoData? orElse
])

Get the geo data corresponding to key in the map.

If key is not found, the geo data of orElse is returned.

Implementation

GeoData getAsGeoData(K key, [GeoData? orElse]) {
  assert(key != null, "The key is empty.");
  if (this == null || !containsKey(key)) {
    return orElse ?? const GeoData();
  }
  return (this![key] as GeoData?) ?? orElse ?? const GeoData();
}