StreamMap<K, V>.of constructor
StreamMap<K, V>.of (
- Map<
K, V> other, { - OnUpdate<
Map< ? onUpdate,K, V> > - OnEvent<
CollectionEvent< ? onEvent,K, V> > - OnChange<
CollectionChangeEvent< ? onChange,K, V> >
Creates a StreamMap wrapped around a LinkedHashMap with the
same keys and values as other
.
A LinkedHashMap
requires the keys to implement compatible
operator==
and hashCode
, and it allows null
as a key.
It iterates in key insertion order.
Implementation
factory StreamMap.of(
Map<K, V> other, {
OnUpdate<Map<K, V>>? onUpdate,
OnEvent<CollectionEvent<K, V>>? onEvent,
OnChange<CollectionChangeEvent<K, V>>? onChange,
}) {
return StreamMap<K, V>(
value: Map<K, V>.of(other),
onUpdate: onUpdate,
onEvent: onEvent,
onChange: onChange,
);
}