create<V, I extends Iterable<V> > static method
CollectiveValue<V>
create<V, I extends Iterable<V> >({
- V? value,
- bool unmodifiableElement = true,
- Cell? bind,
- ContainerType? container,
- CollectiveReceptor<
dynamic, Signal, Signal> receptor = CollectiveReceptor.unchanged, - TestCollective<
dynamic, Collective> test = TestCollective.passed, - MapObject? mapObject,
- Synapses<
Signal, Cell> synapses = Synapses.enabled, - bool setter(
- CollectiveValue<
V> value, - I container,
- V? v
- CollectiveValue<
- V? getter(
- CollectiveValue<
V> value, - I container
- CollectiveValue<
override
Factory constructor for creating unmodifiable values with full configuration.
Parameters:
value
: Initial valueunmodifiableElement
: If true and value contains Cell objects, makes them unmodifiablebind
: Cell to bind tocontainer
: Container typereceptor
: Signal receptortest
: Validation rules- map: Value transformations
synapses
: Connection configurationsetter
: Custom setter functiongetter
: Custom getter function
Implementation
static CollectiveValue<V> create<V, I extends Iterable<V>>({
V? value,
bool unmodifiableElement = true,
Cell? bind,
ContainerType? container,
CollectiveReceptor receptor = CollectiveReceptor.unchanged,
TestCollective test = TestCollective.passed,
MapObject? mapObject,
Synapses synapses = Synapses.enabled,
bool Function(CollectiveValue<V> value, I container, V? v)? setter,
V? Function(CollectiveValue<V> value, I container)? getter,
}) {
return UnmodifiableCollectiveValue<V>.fromProperties(_CollectiveValueProperties<V,I>(
bind: bind,
container: container ?? ContainerType.value,
test: test,
receptor: receptor,
synapses: synapses,
setter: setter,
getter: getter
), unmodifiableElement: unmodifiableElement, value: value);
}