useValueNotifier<T> function

ValueNotifier<T> useValueNotifier<T>(
  1. T initialData, [
  2. List<Object?>? keys
])

Creates a ValueNotifier that is automatically disposed.

As opposed to useState, this hook does not subscribe to ValueNotifier. This allows a more granular rebuild.

See also:

Implementation

ValueNotifier<T> useValueNotifier<T>(T initialData, [List<Object?>? keys]) {
  return use(
    _ValueNotifierHook(
      initialData: initialData,
      keys: keys,
    ),
  );
}