IList<T> constructor

IList<T>([
  1. Iterable<T>? iterable
])

Create an IList from an iterable, with the default configuration. Fast, if the iterable is another IList.

To create an empty IList with the default configuration, just omit the iterable: IList().

Note: To create an IList with a specific configuration, use the IList.withConfig() constructor.

Note: If you want to create an empty IList of the same configuration as a source IList, simply call clear on the source IList.

Implementation

factory IList([Iterable<T>? iterable]) => //
    IList.withConfig(iterable ?? const [], defaultConfig);