toValueIList method
Returns an IList of the map values.
Optionally, you may provide a config
for the list.
If sort
is true, then the list will be sorted with compare
, if
provided, or with compareObject if not provided. If sort
is
false, compare
will be ignored.
Implementation
IList<V> toValueIList({
bool sort = false,
int Function(V a, V b)? compare,
ConfigList? config,
}) {
assert(compare == null || sort == true);
var result = IList.withConfig(values, config ?? IList.defaultConfig);
if (sort) result = result.sort(compare ?? compareObject);
return result;
}