toList method
Returns a List with all items from the set.
If you provide a compare
function, the list will be sorted with it.
Implementation
@override
List<T> toList({
bool growable = true,
int Function(T a, T b)? compare,
}) {
if (config.sort && compare == null) {
return (flush._s as SFlat<T>).toList(growable: growable);
} else {
var result = _s.toList(growable: growable);
if (compare != null) result.sort(compare);
return result;
}
}