removeListener method
Removes a listener for a specific notification type.
type
specifies the type of notification.
listener
is the callback function to be removed.
Implementation
void removeListener(NotificationMessage_NotificationType type, void Function(NotificationMessage) listener) {
_listeners[type]?.remove(listener);
if (_listeners[type]?.isEmpty ?? false) {
_listeners.remove(type);
}
}