toMap<K, V> method
Observable<Map<K, V> >
toMap<K, V>({
- Map0<
Map< ? constructor,K, V> > - Map1<
T, K> ? keySelector, - Map1<
T, V> ? valueSelector,
Returns a Map from an observable sequence.
Implementation
Observable<Map<K, V>> toMap<K, V>(
{Map0<Map<K, V>>? constructor,
Map1<T, K>? keySelector,
Map1<T, V>? valueSelector}) =>
ToMapObservable<T, Map<K, V>, K, V>(
this,
constructor ?? () => <K, V>{},
keySelector ?? (value) => value as K,
valueSelector ?? (value) => value as V,
(map, key, value) => map[key] = value);