validate method

  1. @override
void validate()

Validates the properties of the notification channel.

Throws an AwesomeNotificationsException if the channelKey, channelName, or channelDescription is missing.

Implementation

@override
void validate() {
  if (AwesomeAssertUtils.isNullOrEmptyOrInvalid(channelKey)) {
    throw const AwesomeNotificationsException(
        message: 'Property channelKey is required');
  }
  if (AwesomeAssertUtils.isNullOrEmptyOrInvalid(channelName)) {
    throw const AwesomeNotificationsException(
        message: 'Property channelName is required');
  }
  if (AwesomeAssertUtils.isNullOrEmptyOrInvalid(channelDescription)) {
    throw const AwesomeNotificationsException(
        message: 'Property channelDescription is required');
  }
}