maybeWhen<T> method
T
maybeWhen<T>({
- T? client()?,
- T? federation()?,
- required T orElse(),
Implementation
T maybeWhen<T>({
T? Function()? client,
T? Function()? federation,
required T Function() orElse,
}) =>
{
EventFormat.client: client,
EventFormat.federation: federation,
}[this]
?.call() ??
orElse();