unlockView property

List<T> unlockView

Unlocks the list, returning a safe, unmodifiable (immutable) List view. The word "view" means the list is backed by the original IList. Using this is very fast, since it makes no copies of the IList items. However, if you try to use methods that modify the list, like add, it will throw an UnsupportedError. It is also very fast to lock this list back into an IList.

See also: UnmodifiableListFromIList

Implementation

List<T> get unlockView => UnmodifiableListFromIList(this);