when<T> method

T when<T>({
  1. required T stable(),
  2. required T unstable(),
})

Implementation

T when<T>({
  required T Function() stable,
  required T Function() unstable,
}) =>
    {
      RoomVersionAvailable.stable: stable,
      RoomVersionAvailable.unstable: unstable,
    }[this]!();