match<T> method
T
match<T>({
- required T eventCenter(
- GestureActionEventCenter value
- required T mapPosition(
- GestureActionMapPosition value
- required T targetGeoPoint(),
Implementation
T match<T>({
required T Function(GestureActionEventCenter value) eventCenter,
required T Function(GestureActionMapPosition value) mapPosition,
required T Function(GestureActionTargetGeoPoint value) targetGeoPoint,
}) {
return switch (this._index) {
0 => eventCenter(this._value as GestureActionEventCenter),
1 => mapPosition(this._value as GestureActionMapPosition),
2 => targetGeoPoint(this._value as GestureActionTargetGeoPoint),
_ => throw NativeException("Unrecognized case index ${this._index}")
};
}