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