compareByField<T, F extends Comparable<F>> function

Comparator<T> compareByField<T, F extends Comparable<F>>(
  1. F fieldValue(
    1. T t
    )
)

Implementation

Comparator<T> compareByField<T, F extends Comparable<F>>(
  F Function(T t) fieldValue,
) =>
    compareByFieldNatural(
      fieldValue,
      comparator: compareTo<F>,
    );