sortedBy<K extends Comparable> method

Bloom<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.

  • keyOf: Function extracting the comparable sort key from each element.

Implementation

Bloom<List<E>> sortedBy<K extends Comparable<dynamic>>(
        K Function(E element) keyOf) =>
    computed((via) => List.unmodifiable(
        via(bloom).sortedByCompare<K>(keyOf, (a, b) => a.compareTo(b))));