valueNotifierToSignal#
Kind:
function |
Package: package:signals_flutter
Function: valueNotifierToSignal#
Signal<T> valueNotifierToSignal(ValueNotifier<T> valueNotifier, {String? debugLabel, bool autoDispose = false})
A global helper function to convert a Flutter ValueNotifier to a mutable Signal.
Updates to either the notifier or the returned signal will automatically update the other.
This helper is a functional equivalent of the toSignal() extension method.
Example#
final textControllerValue = ValueNotifier('');
final textSignal = valueNotifierToSignal(textControllerValue);
References#
The valueNotifierToSignal type is referenced and used in the following pages:
- Value Notifier To Signal (signals_flutter/extensions)
- Value Notifier To Signal (signals/extensions)