AndroidAppNotification.withType constructor
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,
};