maybeWhen<T> method
T
maybeWhen<T>({
- T? guest()?,
- T? user()?,
- required T orElse(),
Implementation
T maybeWhen<T>({
T? Function()? guest,
T? Function()? user,
required T Function() orElse,
}) =>
{
AccountKind.guest: guest,
AccountKind.user: user,
}[this]
?.call() ??
orElse();