sortedBy method

Iterable<E> sortedBy(
  1. Comparable? key(
    1. E? e
    )
)

Sort list use to Comparable colums

Implementation

Iterable<E> sortedBy(Comparable? key(E? e)) =>
    toList()..sort((a, b) => key(a)?.compareTo(key(b)) ?? 1);