match<T> method
T
match<T>({
- required T geoPoint(
- GeoPoint value
- required T geoPointWithElevation(
- GeoPointWithElevation value
Implementation
T match<T>({
required T Function(GeoPoint value) geoPoint,
required T Function(GeoPointWithElevation value) geoPointWithElevation,
}) {
return switch (this._index) {
0 => geoPoint(this._value as GeoPoint),
1 => geoPointWithElevation(this._value as GeoPointWithElevation),
_ => throw NativeException("Unrecognized case index ${this._index}")
};
}