UnmodifiableCollectiveList<E>.bind constructor
UnmodifiableCollectiveList<E>.bind (
- Collective bind, {
- bool unmodifiableElement = true,
- CollectiveListProperties<
E> ? properties, - Iterable<
E> ? elements,
Creates an unmodifiable list bound to an existing Collective.
Parameters:
- bind: The collective to make unmodifiable
- unmodifiableElement: Whether to make elements unmodifiable (default true)
- properties: Optional custom properties
- elements: Optional elements to use instead of bind's elements
Implementation
UnmodifiableCollectiveList.bind(Collective bind, {bool unmodifiableElement = true, CollectiveListProperties<E>? properties, Iterable<E>? elements})
: super(properties ?? CollectiveListProperties<E>(), unmodifiableElement: unmodifiableElement,
elements: elements ?? (unmodifiableElement ? bind.whereType<E>() : bind.whereType<E>().map<E>((e) => e is Cell ? e.unmodifiable as E : e))
);