useValueNotifier<T> function
Creates a ValueNotifier.
The notifier is automatically disposed when the widget is unmounted.
Implementation
ValueNotifier<T> useValueNotifier<T>(T value) {
final n = ValueNotifier<T>(value);
onBeforeUnmount(n.dispose);
return n;
}