when<T> method

T when<T>({
  1. required T b(),
  2. required T f(),
})

Implementation

T when<T>({required T Function() b, required T Function() f}) =>
    {Direction.b: b, Direction.f: f}[this]!();