signal<T> function

FlutterSignal<T> signal<T>(
  1. T value, {
  2. String? debugLabel,
  3. bool autoDispose = false,
})

Simple signal that can be created with type T that can read and write a value.

final count = signal(0);
print(count.value); // 0
count.value++;
print(count.value); // 1

Implementation

FlutterSignal<T> signal<T>(
  T value, {
  String? debugLabel,
  bool autoDispose = false,
}) {
  return FlutterSignal<T>(
    value,
    debugLabel: debugLabel,
    autoDispose: autoDispose,
  );
}