when<T> method

T when<T>({
  1. required T private(),
  2. required T public(),
})

Implementation

T when<T>({
  required T Function() private,
  required T Function() public,
}) =>
    {
      Visibility.private: private,
      Visibility.public: public,
    }[this]!();