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