ValueListenableProvider<T>.value constructor

  1. {Key key,
  2. @required ValueListenable<T> value,
  3. UpdateShouldNotify<T> updateShouldNotify,
  4. TransitionBuilder builder,
  5. Widget child}

Listens to value and exposes its current value.

Changing value will stop listening to the previous value and listen the new one. Removing ValueListenableProvider from the tree will also stop listening to value.

ValueListenable<int> foo;

  valueListenable: foo,
  child: Container(),


  Key key,
  @required ValueListenable<T> value,
  UpdateShouldNotify<T> updateShouldNotify,
  TransitionBuilder builder,
  Widget child,
}) : super.value(
        key: key,
        builder: builder,
        value: value,
        updateShouldNotify: updateShouldNotify,
        startListening: _startListening(),
        child: child,