A signal widget builder.

Reacts to the signal calling the builder each time. The signal and builder arguments must not be null. The child is optional but is good practice to use if part of the widget subtree does not depend on the value of the signal.

// sample counter
final counter = createSignal(0);

void dispose() {

Widget build(BuildContext context) {
  return SignalBuilder(
        signal: counter,
        builder: (context, value, child) {
          return Text('$value');

If you need to nest multiple SignalBuilders you may also check:

  • DualSignalBuilder to react to 2 signals at once
  • TripleSignalBuilder to react to 3 signals at once.