maybeWhen<T> method

T maybeWhen<T>({
  1. T? stable()?,
  2. T? unstable()?,
  3. 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();