maybeMap<TResult extends Object?> method
TResult
maybeMap<TResult extends Object?>({
- TResult applePay(
- InputCredentialsApplePay value
- TResult googlePay()?,
- TResult $new(
- InputCredentialsNew value
- TResult saved(
- InputCredentialsSaved value
- required TResult orElse(),
Implementation
TResult maybeMap<TResult extends Object?>({
TResult Function(InputCredentialsApplePay value)? applePay,
TResult Function(InputCredentialsGooglePay value)? googlePay,
TResult Function(InputCredentialsNew value)? $new,
TResult Function(InputCredentialsSaved value)? saved,
required TResult Function() orElse,
}) {
switch (getConstructor()) {
case InputCredentialsApplePay.constructor:
if (applePay != null) {
return applePay.call(this as InputCredentialsApplePay);
}
break;
case InputCredentialsGooglePay.constructor:
if (googlePay != null) {
return googlePay.call(this as InputCredentialsGooglePay);
}
break;
case InputCredentialsNew.constructor:
if ($new != null) {
return $new.call(this as InputCredentialsNew);
}
break;
case InputCredentialsSaved.constructor:
if (saved != null) {
return saved.call(this as InputCredentialsSaved);
}
break;
}
return orElse.call();
}