SignalValueListenable<T, N extends ValueListenable<T>, S extends ReadonlySignal<T>>.fromValueListenable constructor

SignalValueListenable<T, N extends ValueListenable<T>, S extends ReadonlySignal<T>>.fromValueListenable(
  1. N val, {
  2. String? debugLabel,
  3. bool autoDispose = false,
})

Implementation

factory SignalValueListenable.fromValueListenable(
  N val, {
  String? debugLabel,
  bool autoDispose = false,
}) {
  return SignalValueListenable.merge(
    val,
    signal<T>(
      val.value,
      debugLabel: debugLabel,
      autoDispose: autoDispose,
    ) as S,
  );
}