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