ObservableReference<T> constructor

ObservableReference<T>(
  1. T? _value, {
  2. EqualsFn<T?> equalsFn = _defaultEq,
  3. bool coalesce = false,
})

Creates a listenable value holder, starting with the given value. Optionally takes custom equality function. Changes are published synchronously by default. When coalesce is set, the changes in the current execution block are collected, and only the last value will be published (in an async scheduled microtask).

Implementation

ObservableReference(this._value,
    {EqualsFn<T?> equalsFn = _defaultEq, bool coalesce = false})
    : _equalsFn = equalsFn,
      super(coalesce);