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