IList<T>.fromISet constructor

IList<T>.fromISet(
  1. ISet<T> iset, {
  2. int compare(
    1. T a,
    2. T b
    )?,
  3. required ConfigList? config,
})

Special IList constructor from ISet.

If you provide a compare function, the resulting list will be sorted with it.

Implementation

factory IList.fromISet(
  ISet<T> iset, {
  int Function(T a, T b)? compare,
  required ConfigList? config,
}) {
  List<T> list = iset.toList(growable: false, compare: compare);
  return IListImpl._unsafe(LFlat<T>.unsafe(list), config: config ?? defaultConfig);
}