ObservableMap<K, V>.from constructor

ObservableMap<K, V>.from(
  1. Map<K, V> other, {
  2. bool notifyWhenEqual = false,
})

Creates an observable map that contains all key value pairs of other. It will attempt to use the same backing map type if the other map is a LinkedHashMap, SplayTreeMap, or HashMap. Otherwise it defaults to HashMap.

Note this will perform a shallow conversion. If you want a deep conversion you should use toObservable.

Implementation

factory ObservableMap.from(Map<K, V> other, {bool notifyWhenEqual = false}) {
  return ObservableMap<K, V>.createFromType(other,
      notifyWhenEqual: notifyWhenEqual)
    ..addAll(other);
}