when method
void
when({
- required void onGeoObject(
- GeoObject value
- required void onGeoObjectCollection(
- GeoObjectCollection value
Applies the passed function to the variant value.
Implementation
void when({
required void Function(mapkit_geo_object.GeoObject value) onGeoObject,
required void Function(GeoObjectCollection value) onGeoObjectCollection,
}) {
if (_value is mapkit_geo_object.GeoObject) {
return onGeoObject(_value as mapkit_geo_object.GeoObject);
}
if (_value is GeoObjectCollection) {
return onGeoObjectCollection(_value as GeoObjectCollection);
}
assert(false);
}