asList method

List<E> asList()

Creates a fixed-length List containing the elements of this Iterable, equivalent to toList(growable: false).

Returns an empty list if the receiver is null.

See Iterable.toList

Implementation

List<E> asList() => this?.toList(growable: false) ?? List.empty();