WatchBuilder<T extends Widget> constructor

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

Minimal builder for signal changes that rerender a widget tree.

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

Implementation

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