sortedBy<K extends Comparable> method

Coral<List<E>> sortedBy<K extends Comparable>(
  1. K keyOf(
    1. E element
    )
)

Returns a list containing the elements of this collection sorted by keyOf reactively.

Implementation

Coral<List<E>> sortedBy<K extends Comparable<dynamic>>(
        K Function(E element) keyOf) =>
    coral.map((source) => List.unmodifiable(
        source.sortedByCompare<K>(keyOf, (a, b) => a.compareTo(b))));