maybeMap<TResult extends Object?> method
TResult
maybeMap<TResult extends Object?>({
- TResult other(
- PaymentProviderOther value
- TResult smartGlocal()?,
- TResult stripe(
- PaymentProviderStripe value
- required TResult orElse(),
Implementation
TResult maybeMap<TResult extends Object?>({
TResult Function(PaymentProviderOther value)? other,
TResult Function(PaymentProviderSmartGlocal value)? smartGlocal,
TResult Function(PaymentProviderStripe value)? stripe,
required TResult Function() orElse,
}) {
switch (getConstructor()) {
case PaymentProviderOther.constructor:
if (other != null) {
return other.call(this as PaymentProviderOther);
}
break;
case PaymentProviderSmartGlocal.constructor:
if (smartGlocal != null) {
return smartGlocal.call(this as PaymentProviderSmartGlocal);
}
break;
case PaymentProviderStripe.constructor:
if (stripe != null) {
return stripe.call(this as PaymentProviderStripe);
}
break;
}
return orElse.call();
}