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