setNotificationConfig static method

void setNotificationConfig({
  1. Priority priority = Priority.PRIORITY_DEFAULT,
  2. Importance importance = Importance.IMPORTANCE_DEFAULT,
  3. bool notificationSoundEnabled = true,
  4. bool notificationInterceptionEnabled = false,
  5. String? largeIcon,
  6. String? smallIcon,
})

Accepts Notification configurations allowing you to configure all the notification related parameters (Android)

Implementation

static void setNotificationConfig(
    {Priority priority = Priority.PRIORITY_DEFAULT,
      Importance importance = Importance.IMPORTANCE_DEFAULT,
      bool notificationSoundEnabled = true,
      bool notificationInterceptionEnabled = false,
      String? largeIcon,
      String? smallIcon}) async {
  await _channel.invokeMethod(
    'setNotificationConfig',
    <String, dynamic>{
      'priority': priority.priorityValue(),
      'importance': importance.importanceValue(),
      'notificationSoundEnabled': notificationSoundEnabled,
      'notificationInterceptionEnabled': notificationInterceptionEnabled,
      'largeIcon': largeIcon,
      'smallIcon': smallIcon,
    },
  );
}