sort method

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

Sort the list in place using the provided compare function.

Implementation

void sort([int Function(T a, T b)? compare]) {
  final list = value.toList();

  list.sort(compare);
  value = list;
}