addListener method

void addListener(
  1. VoidCallback cb
)

Implementation

void addListener(VoidCallback cb) {
  if (_disposed) {
    throw Exception('Called `addListener()` on disposed ValueNotifier');
  }
  _listeners.add(cb);
}