addListener method
Adds a listener for a specific notification type.
type
specifies the type of notification to listen for.
listener
is the callback function to be executed when the notification is received.
Implementation
void addListener(NotificationMessage_NotificationType type, void Function(NotificationMessage) listener) {
_listeners.putIfAbsent(type, () => []).add(listener);
}