Skip to content

Upgrading flutter_local_notifications 18 to 19

Breaking18.0.1 → 19.5.0Breaking8Platform4New14Changed4Fixed6Other10

BreakingUpgrade verdict

5 breaking changes and 3 platform requirement changes.

  • Callers of zonedSchedule() must stop passing the removed parameter.
  • This rename is unlikely to affect plugin users but fixes symbol clashes.
  • Android apps using this plugin must now build against Android SDK 35.
  • Code relying on the old bit-shifted index values must use the new value property instead.
Top 5 of 8 that need code or config changes

Dart SDK requirement changed in 19.0.0-dev.6: ^3.1.0 → ^3.4.0.

Flutter requirement changed in 19.0.0-dev.6: >=3.13.0 → >=3.22.0.

Breaking5
Removes the uiLocalNotificationDateInterpretation parameter from zonedSchedule().
zonedSchedule()uiLocalNotificationDateInterpretationUILocalNotificationDateInterpretation
Renames the Converters header and implementation to FlutterLocalNotificationsConverters to avoid name clashes.
ConvertersFlutterLocalNotificationsConverters
Bumps Android compileSdk to 35 and updates the readme to mention this.
compileSdk
Makes DarwinNotificationActionOption and DarwinNotificationCategoryOption enhanced enums whose value matches native representations.
DarwinNotificationActionOptionDarwinNotificationCategoryOptionvalue
Reworks Windows custom image and audio APIs: WindowsNotificationAudio.fromFile() becomes asset(), and WindowsImage.file() becomes WindowsImage().
WindowsNotificationAudio.fromFile()WindowsNotificationAudio.asset()WindowsImage.file()WindowsImage()
Platform3
Bumps Android Gradle Plugin to 8.6.0 to align with the minimum version for compileSdk 35.
compileSdk
Bumps minimum Flutter SDK to 3.22.0, Dart SDK to 3.4.0, and minimum Android version to 5.0 (API 21).
Bumps minimum Flutter SDK requirement to 3.19.0 and Dart SDK requirement to 3.3.0.

Generated by DepDelta from published Dart source. Not mixed with prose notes.

  • removed: enum UILocalNotificationDateInterpretation
  • removed: member UILocalNotificationDateInterpretation.absoluteTime
  • removed: member UILocalNotificationDateInterpretation.wallClockTime
  • changed: ctor AndroidNotificationAction( this.id, this.title, { this.titleColor, this.icon, this.contextual = …, this.showsUserInterface = …, this.allowGeneratedReplies = …, this.inputs = …, this.cancelNotification = …, }) → ctor AndroidNotificationAction( this.id, this.title, { this.titleColor, this.icon, this.contextual = …, this.showsUserInterface = …, this.allowGeneratedReplies = …, this.inputs = …, this.cancelNotification = …, this.semanticAction = …, this.invisible = …, })
  • changed: ctor AndroidNotificationChannel( this.id, this.name, { this.description, this.groupId, this.importance = …, this.playSound = …, this.sound, this.enableVibration = …, this.vibrationPattern, this.showBadge = …, this.enableLights = …, this.ledColor, this.audioAttributesUsage = …, }) → ctor AndroidNotificationChannel( this.id, this.name, { this.description, this.groupId, this.importance = …, this.bypassDnd = …, this.playSound = …, this.sound, this.enableVibration = …, this.vibrationPattern, this.showBadge = …, this.enableLights = …, this.ledColor, this.audioAttributesUsage = …, })
  • changed: ctor AndroidNotificationDetails( this.channelId, this.channelName, { this.channelDescription, this.icon, this.importance = …, this.priority = …, this.styleInformation, this.playSound = …, this.sound, this.enableVibration = …, this.vibrationPattern, this.groupKey, this.setAsGroupSummary = …, this.groupAlertBehavior = …, this.autoCancel = …, this.ongoing = …, this.silent = …, this.color, this.large… → ctor AndroidNotificationDetails( this.channelId, this.channelName, { this.channelDescription, this.icon, this.importance = …, this.channelBypassDnd = …, this.priority = …, this.styleInformation, this.playSound = …, this.sound, this.enableVibration = …, this.vibrationPattern, this.groupKey, this.setAsGroupSummary = …, this.groupAlertBehavior = …, this.autoCancel = …, this.ongoing = …, this.silent…
  • changed: ctor DarwinInitializationSettings({ this.requestAlertPermission = …, this.requestSoundPermission = …, this.requestBadgePermission = …, this.requestProvisionalPermission = …, this.requestCriticalPermission = …, this.defaultPresentAlert = …, this.defaultPresentSound = …, this.defaultPresentBadge = …, this.defaultPresentBanner = …, this.defaultPresentList = …, this.notificationCategories = …, }) → ctor DarwinInitializationSettings({ this.requestAlertPermission = …, this.requestSoundPermission = …, this.requestBadgePermission = …, this.requestProvisionalPermission = …, this.requestCriticalPermission = …, this.requestProvidesAppNotificationSettings = …, this.defaultPresentAlert = …, this.defaultPresentSound = …, this.defaultPresentBadge = …, this.defaultPresentBanner = …, this.defaultPresent…
  • changed: ctor DarwinNotificationDetails({ this.presentAlert, this.presentBadge, this.presentSound, this.presentBanner, this.presentList, this.sound, this.badgeNumber, this.attachments, this.subtitle, this.threadIdentifier, this.categoryIdentifier, this.interruptionLevel, }) → ctor DarwinNotificationDetails({ this.presentAlert, this.presentBadge, this.presentSound, this.presentBanner, this.presentList, this.sound, this.badgeNumber, this.attachments, this.subtitle, this.threadIdentifier, this.categoryIdentifier, this.interruptionLevel, this.criticalSoundVolume, })
  • changed: ctor InitializationSettings({ this.android, this.iOS, this.macOS, this.linux, }) → ctor InitializationSettings({ this.android, this.iOS, this.macOS, this.linux, this.windows, })
  • changed: ctor NotificationDetails({ this.android, this.iOS, this.macOS, this.linux, }) → ctor NotificationDetails({ this.android, this.iOS, this.macOS, this.linux, this.windows, })
  • changed: ctor NotificationsEnabledOptions({ required this.isEnabled, required this.isSoundEnabled, required this.isAlertEnabled, required this.isBadgeEnabled, required this.isProvisionalEnabled, required this.isCriticalEnabled, }) → ctor NotificationsEnabledOptions({ required this.isEnabled, required this.isSoundEnabled, required this.isAlertEnabled, required this.isBadgeEnabled, required this.isProvisionalEnabled, required this.isCriticalEnabled, required this.isProvidesAppNotificationSettingsEnabled, })
  • changed: method FlutterLocalNotificationsPlugin.zonedSchedule( int id, String? title, String? body, TZDateTime scheduledDate, NotificationDetails notificationDetails, { required UILocalNotificationDateInterpretation uiLocalNotificationDateInterpretation, required AndroidScheduleMode androidScheduleMode, String? payload, DateTimeComponents? matchDateTimeComponents, }): Future<void> → method FlutterLocalNotificationsPlugin.zonedSchedule( int id, String? title, String? body, TZDateTime scheduledDate, NotificationDetails notificationDetails, { required AndroidScheduleMode androidScheduleMode, String? payload, DateTimeComponents? matchDateTimeComponents, }): Future<void>
  • changed: method IOSFlutterLocalNotificationsPlugin.requestPermissions({ bool sound = …, bool alert = …, bool badge = …, bool provisional = …, bool critical = …, }): Future<bool?> → method IOSFlutterLocalNotificationsPlugin.requestPermissions({ bool sound = …, bool alert = …, bool badge = …, bool provisional = …, bool critical = …, bool providesAppNotificationSettings = …, }): Future<bool?>
  • changed: method IOSFlutterLocalNotificationsPlugin.zonedSchedule( int id, String? title, String? body, TZDateTime scheduledDate, DarwinNotificationDetails? notificationDetails, { required UILocalNotificationDateInterpretation uiLocalNotificationDateInterpretation, String? payload, DateTimeComponents? matchDateTimeComponents, }): Future<void> → method IOSFlutterLocalNotificationsPlugin.zonedSchedule( int id, String? title, String? body, TZDateTime scheduledDate, DarwinNotificationDetails? notificationDetails, { String? payload, DateTimeComponents? matchDateTimeComponents, }): Future<void>
  • changed: method MacOSFlutterLocalNotificationsPlugin.requestPermissions({ bool sound = …, bool alert = …, bool badge = …, bool provisional = …, bool critical = …, }): Future<bool?> → method MacOSFlutterLocalNotificationsPlugin.requestPermissions({ bool sound = …, bool alert = …, bool badge = …, bool provisional = …, bool critical = …, bool providesAppNotificationSettings = …, }): Future<bool?>
  • added: ctor DarwinNotificationActionOption(this.value)
  • added: ctor DarwinNotificationCategoryOption(this.value)
  • added: ctor SemanticAction(this.value)
  • added: enum SemanticAction
  • added: field AndroidNotificationAction.invisible: final bool
  • added: field AndroidNotificationAction.semanticAction: final SemanticAction
  • added: field AndroidNotificationChannel.bypassDnd: final bool
  • added: field AndroidNotificationDetails.channelBypassDnd: final bool
  • added: field DarwinInitializationSettings.requestProvidesAppNotificationSettings: final bool
  • added: field DarwinNotificationActionOption.value: final int
  • added: field DarwinNotificationCategoryOption.value: final int
  • added: field DarwinNotificationDetails.criticalSoundVolume: final double?
  • added: field InitializationSettings.windows: final WindowsInitializationSettings?
  • added: field NotificationDetails.windows: final WindowsNotificationDetails?
  • added: field NotificationsEnabledOptions.isProvidesAppNotificationSettingsEnabled: final bool
  • added: field SemanticAction.value: final int
  • added: member SemanticAction.archive
  • added: member SemanticAction.call
  • added: member SemanticAction.delete
  • added: member SemanticAction.markAsRead
  • added: member SemanticAction.markAsUnread
  • added: member SemanticAction.mute
  • added: member SemanticAction.none
  • added: member SemanticAction.reply
  • added: member SemanticAction.thumbsDown
  • added: member SemanticAction.thumbsUp
  • added: member SemanticAction.unmute
  • added: method AndroidFlutterLocalNotificationsPlugin.hasNotificationPolicyAccess(): Future<bool?>
  • added: method AndroidFlutterLocalNotificationsPlugin.requestNotificationPolicyAccess(): Future<bool?>
  • added: method FlutterLocalNotificationsPlugin.cancelAllPendingNotifications(): Future<void>