Watch<T extends Widget>.builder constructor
const
Watch<T extends Widget>.builder ({
- Key? key,
- required T builder(
- BuildContext context
- String? debugLabel,
- List<
ReadonlySignal> dependencies = const [],
Drop in replacement for the Flutter builder widget.
final counter = signal(0);
...
- Builder(
+ Watch.builder(
builder: (context) {
return Text('$counter');
}
)
Implementation
const Watch.builder({
super.key,
required this.builder,
this.debugLabel,
this.dependencies = const [],
});