sortWith<A> method

List<T> sortWith<A>(
  1. A extract(
    1. T t
    ),
  2. Order<A> order
)

Sort this Iterable based on order of an object of type A extracted from T using extract.

Implementation

List<T> sortWith<A>(A Function(T t) extract, Order<A> order) =>
    [...this]..sort((e1, e2) => order.compare(extract(e1), extract(e2)));