maybeWhen<T> method

T maybeWhen<T>({
  1. T? email()?,
  2. T? msisdn()?,
  3. required T orElse(),
})

Implementation

T maybeWhen<T>({
  T? Function()? email,
  T? Function()? msisdn,
  required T Function() orElse,
}) =>
    {
      ThirdPartyIdentifierMedium.email: email,
      ThirdPartyIdentifierMedium.msisdn: msisdn,
    }[this]
        ?.call() ??
    orElse();