maybeWhen<T> method
T
maybeWhen<T>({
- T? content()?,
- T? override()?,
- T? room()?,
- T? sender()?,
- T? underride()?,
- required T orElse(),
Implementation
T maybeWhen<T>({
T? Function()? content,
T? Function()? override,
T? Function()? room,
T? Function()? sender,
T? Function()? underride,
required T Function() orElse,
}) =>
{
PushRuleKind.content: content,
PushRuleKind.override: override,
PushRuleKind.room: room,
PushRuleKind.sender: sender,
PushRuleKind.underride: underride,
}[this]
?.call() ??
orElse();