maybeWhen<T> method
T
maybeWhen<T>({
- T? privateChat()?,
- T? publicChat()?,
- T? trustedPrivateChat()?,
- required T orElse(),
Implementation
T maybeWhen<T>({
T? Function()? privateChat,
T? Function()? publicChat,
T? Function()? trustedPrivateChat,
required T Function() orElse,
}) =>
{
CreateRoomPreset.privateChat: privateChat,
CreateRoomPreset.publicChat: publicChat,
CreateRoomPreset.trustedPrivateChat: trustedPrivateChat,
}[this]
?.call() ??
orElse();