AndroidAppNotification.withType constructor

AndroidAppNotification.withType({
  1. required String title,
  2. required String body,
  3. required String bigText,
  4. required String contentTitle,
  5. required String summaryText,
  6. required AppNotificationType type,
})

Implementation

AndroidAppNotification.withType({
  required this.title,
  required this.body,
  required this.bigText,
  required this.contentTitle,
  required this.summaryText,
  required AppNotificationType type,
})  : channelId = getAndroidChannel(type).id,
      channelName = getAndroidChannel(type).name,
      channelDescription = getAndroidChannel(type).description!,
      importance = getAndroidChannel(type).importance,
      priority = switch (type) {
        AppNotificationType.shutdown => Priority.high,
        AppNotificationType.maintenanceNotice ||
        AppNotificationType.longRunningNotice ||
        AppNotificationType.notice =>
          Priority.low,
        AppNotificationType.warning ||
        AppNotificationType.engineStartedNotice ||
        AppNotificationType.engineStoppedNotice ||
        AppNotificationType.exerciseEndedNotice ||
        AppNotificationType.exerciseStartedNotice ||
        AppNotificationType.offlineNotice ||
        AppNotificationType.onlineNotice =>
          Priority.defaultPriority,
      };