W3cubDocs

/Dart 2

List<E>.unmodifiable constructor

List<E>.unmodifiable(Iterable elements)

Creates an unmodifiable list containing all elements.

The Iterator of elements provides the order of the elements.

An unmodifiable list cannot have its length or elements changed. If the elements are themselves immutable, then the resulting list is also immutable.

Implementation

external factory List.unmodifiable(Iterable elements);

© 2012 the Dart project authors
Licensed under the Creative Commons Attribution-ShareAlike License v4.0.
https://api.dartlang.org/stable/2.0.0/dart-core/List/List.unmodifiable.html