lazySignal<T> function

Signal<T> lazySignal<T>({
  1. String? debugLabel,
  2. bool autoDispose = false,
})

Lazy signal that can be created with type T that the value will be assigned later.

final db = lazySignal<DatabaseConnection>();
...
db.value = DatabaseConnect(...);

Implementation

Signal<T> lazySignal<T>({
  String? debugLabel,
  bool autoDispose = false,
}) {
  return Signal<T>.lazy(
    debugLabel: debugLabel,
    autoDispose: autoDispose,
  );
}