sort method
Sorts this list according to the order specified by the compare
function.
Listeners are notified after sorting is completed.
The compare
function must act as a Comparator.
The default List implementations use Comparable.compare if compare
is omitted.
Implementation
@override
void sort([int Function(T a, T b)? compare]) {
assert(_debugAssertNotDisposed());
_list!.sort(compare);
notifyListeners();
}