sort method

  1. @override
void sort([
  1. int compare(
    1. T a,
    2. T b
    )?
])
override

Sorts this slice according to the order specified by the compare function.

Implementation

@override
void sort([int Function(T a, T b)? compare]) {
  sortUnstableBy(compare ??
      (a, b) => Comparable.compare(a as Comparable, b as Comparable));
}