maybeWhen<T> method
T
maybeWhen<T>({
- T? contentBody()?,
- T? contentName()?,
- T? contentTopic()?,
- required T orElse(),
Implementation
T maybeWhen<T>({
T? Function()? contentBody,
T? Function()? contentName,
T? Function()? contentTopic,
required T Function() orElse,
}) =>
{
KeyKind.contentBody: contentBody,
KeyKind.contentName: contentName,
KeyKind.contentTopic: contentTopic,
}[this]
?.call() ??
orElse();