ValueNotifierWrapper<T> constructor

const ValueNotifierWrapper<T>({
  1. required T initialValue,
  2. required CallbackWidgetBuilder<ValueNotifier<T>> child,
  3. ValueChanged<T>? onChange,
  4. Key? key,
})

Creates a ValueNotifierWrapper.

The initialValue is used to initialize the ValueNotifier. The child builder receives the ValueNotifier instance. The optional onChange callback is called whenever the value changes.

Implementation

const ValueNotifierWrapper({
  required this.initialValue,
  required this.child,
  this.onChange,
  super.key,
});