notifyListeners method
void
notifyListeners(
- T data
notify to listeners and rebuild the widgets
only SimpleNotifier or StateNotifier are allowed to call this method, DON'T call to this method since a sub-type of SimpleNotifier or StateNotifier
Implementation
void notifyListeners(T data) {
_debugAssertNotDisposed();
_isBusy = Completer();
if (_controller != null && !_controller!.isClosed) {
_controller?.sink.add(data);
}
if (_listeners!.isNotEmpty) {
for (final entry in _listeners!) {
if (entry.list != null) entry.listener(data);
}
}
_complete();
}