Observer<T> constructor

const Observer<T>({
  1. Key? key,
  2. required Reactive<T> listenable,
  3. required Widget listener(
    1. T value
    ),
})

Constructs an Observer widget.

The listenable parameter is the reactive variable to listen to.

The update parameter is a callback function that defines the widget to rebuild whenever the listenable variable changes.

Implementation

const Observer({
  Key? key,
  required this.listenable,
  required this.listener,
}) : super(key: key);