sorted method

Coral<List<E>> sorted(
  1. int compare(
    1. E a,
    2. E b
    )
)

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

Implementation

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