when<T> method

T when<T>({
  1. required T content(),
  2. required T override(),
  3. required T room(),
  4. required T sender(),
  5. required T underride(),
})

Implementation

T when<T>({
  required T Function() content,
  required T Function() override,
  required T Function() room,
  required T Function() sender,
  required T Function() underride,
}) =>
    {
      PushRuleKind.content: content,
      PushRuleKind.override: override,
      PushRuleKind.room: room,
      PushRuleKind.sender: sender,
      PushRuleKind.underride: underride,
    }[this]!();