Watch<T extends Widget> constructor

const Watch<T extends Widget>(
  1. T builder(
    1. BuildContext context
    ), {
  2. Key? key,
  3. String? debugLabel,
  4. List<ReadonlySignal> dependencies = const [],
})

Minimal builder for signal changes that rerender a widget tree.

final counter = signal(0);
...
Watch((context) => Text('$counter'))

Implementation

const Watch(
  this.builder, {
  super.key,
  this.debugLabel,
  this.dependencies = const [],
});