when<T> method

T when<T>({
  1. required T crop(),
  2. required T scale(),
})

Implementation

T when<T>({
  required T Function() crop,
  required T Function() scale,
}) =>
    {
      Method.crop: crop,
      Method.scale: scale,
    }[this]!();