when<T> method

T when<T>({
  1. required T rank(),
  2. required T recent(),
})

Implementation

T when<T>({
  required T Function() rank,
  required T Function() recent,
}) =>
    {
      SearchOrder.rank: rank,
      SearchOrder.recent: recent,
    }[this]!();