when<T> method

T when<T>({
  1. required T roomId(),
  2. required T sender(),
})

Implementation

T when<T>({
  required T Function() roomId,
  required T Function() sender,
}) =>
    {
      GroupKey.roomId: roomId,
      GroupKey.sender: sender,
    }[this]!();