toObservableList<T> function

ObservableList<T> toObservableList<T>(
  1. Iterable<T> value, {
  2. bool deep = true,

Converts the Iterable to an ObservableList.

If value is already Observable, it will be returned unmodified.

By default this performs a deep conversion, but you can set deep to false for a shallow conversion. This does not handle circular data structures. If a conversion is peformed, mutations are only observed to the result of this function. Changing the original collection will not affect it.


ObservableList<T> toObservableList<T>(Iterable<T> value, {bool deep = true}) {
  if (value is ObservableList<T>) return value;
  return (deep ? _toObservableDeepIterable(value) : _toObservableShallow(value))
      as ObservableList<T>;