match<T> method
T
match<T>({
- required T none(),
- required T fromAsset(
- VendorConfigFromAsset value
- required T fromFile(
- VendorConfigFromFile value
- required T fromString(
- VendorConfigFromString value
Implementation
T match<T>({
required T Function() none,
required T Function(VendorConfigFromAsset value) fromAsset,
required T Function(VendorConfigFromFile value) fromFile,
required T Function(VendorConfigFromString value) fromString,
}) {
return switch (this._index) {
0 => none(),
1 => fromAsset(this._value as VendorConfigFromAsset),
2 => fromFile(this._value as VendorConfigFromFile),
3 => fromString(this._value as VendorConfigFromString),
_ => throw NativeException("Unrecognized case index ${this._index}")
};
}