maxByEx<TKey> method

T? maxByEx<TKey>(
  1. TKey orderBy(
    1. T? item
    ), {
  2. int compare(
    1. TKey,
    2. TKey
    )?,
})

maxBy as an extension method

Implementation

T? maxByEx<TKey>(
  TKey orderBy(T? item), {
  int Function(TKey, TKey)? compare,
}) =>
    maxBy<T, TKey>(
      this,
      orderBy,
      //TODO: change this after fixing https://github.com/dart-lang/collection/issues/188
      compare: compare == null ? null : (t1, t2) => compare(t1, t2),
    );