maybeWhen<T> method

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

Implementation

T maybeWhen<T>({
  T? Function()? crop,
  T? Function()? scale,
  required T Function() orElse,
}) =>
    {
      Method.crop: crop,
      Method.scale: scale,
    }[this]
        ?.call() ??
    orElse();