maybeWhen<T> method

T maybeWhen<T>({
  1. T? all()?,
  2. T? participated()?,
  3. required T orElse(),
})

Implementation

T maybeWhen<T>({
  T? Function()? all,
  T? Function()? participated,
  required T Function() orElse,
}) =>
    {
      Include.all: all,
      Include.participated: participated,
    }[this]
        ?.call() ??
    orElse();