addObserver method
Implementation
void addObserver(
Object? observer, {
String? key,
NotificationCallback? callback,
}) {
if (observer == null || key == null || callback == null) {
log.severe('add: the param error');
return;
}
_notifications.add(_Notification(key: key, observer: observer, callback: callback));
}