sortedByCompare<K> method

Coral<List<E>> sortedByCompare<K>(
  1. K keyOf(
    1. E element
    ),
  2. int compare(
    1. K a,
    2. K b
    )
)

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

Implementation

Coral<List<E>> sortedByCompare<K>(
        K Function(E element) keyOf, int Function(K a, K b) compare) =>
    coral.map((source) =>
        List.unmodifiable(source.sortedByCompare<K>(keyOf, compare)));