Notifier<T> constructor

Notifier<T>(
  1. T _value
)

Creates a Notifier that wraps the given value.

If kFlutterMemoryAllocationsEnabled is true, it will dispatch an object creation event for debugging memory allocations.

Implementation

Notifier(this._value) {
  if (kFlutterMemoryAllocationsEnabled) {
    ChangeNotifier.maybeDispatchObjectCreation(this);
  }
  _onChange = oneCallTask(notifyListeners);
}