removeObserver method

void removeObserver(
  1. dynamic widget
)

Implementation

void removeObserver(dynamic widget) {
  _notificationMap.forEach((key, value) {
    value.removeWhere((element) => element.key == widget);
  });
  _notificationMap.removeWhere((key, value) => value.isEmpty);
}