sort method

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

Implementation

void sort([int Function(T, T)? compare]) {
  final temp = List<T>.from(value);
  temp.sort(compare);
  value = temp;
}