register method
Implementation
void register(NotificationChannel channel) {
if (channel.id.trim().isEmpty || channel.name.trim().isEmpty) {
throw const InvalidNotificationPayloadException(
'Channel id and name must not be empty.',
);
}
_channels[channel.id] = channel;
}