UnmodifiableCollectiveList<E>.bind constructor

UnmodifiableCollectiveList<E>.bind(
  1. Collective bind, {
  2. bool unmodifiableElement = true,
  3. CollectiveListProperties<E>? properties,
  4. 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))
);