Skip to content

ValueListenable

ReadonlySignal from ValueListenable

To create a readonly signal from a ValueListenable, use the toSignal extension:

final ValueListenable listenable = ValueNotifier(10);
final signal = listenable.toSignal();

ValueListenable from ReadonlySignal

To create a ValueListenable from a readonly signal, use the toValueListenable extension:

final signal = Signal(10);
final listenable = signal.toValueListenable();