Skip to content

Commit 45f799d

Browse files
committed
[flutter_local_notifications] fixed issue importance level was mapped incorrectly when calling getNotificationChannels() (#2107)
* fixed issue mapping importance level when calling getNotificationChannels * bumped version * updated changelog to add mention of updated readme
1 parent 9204cd6 commit 45f799d

File tree

3 files changed

+26
-2
lines changed

3 files changed

+26
-2
lines changed

flutter_local_notifications/CHANGELOG.md

+22
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# [15.1.2]
2+
3+
* [Android] fixed issue [2106](https://github.com/MaikuB/flutter_local_notifications/issues/2106) where calling `getNotificationChannels()` reports the wrong importance level or result in an exception if the importance level was unspecified. This hotfix has been taken from the 16.0.0-dev.3 prerelease and included in the 14.1.4 hotfix release
4+
15
# [15.1.1]
26

37
* [Android] fixed issue an issue similar to [2033](https://github.com/MaikuB/flutter_local_notifications/issues/2033) that was addressed in 15.0.1 where notifications on scheduled using older version of the plugin via the `periodicallyShow()` method would fail to have the next subsequent ones scheduled. This issue started occuring in 14.0 where support for inexact notifications was added using the `ScheduleMode` enum that was added and resulted in the deprecation of `androidAllowWhileIdle`. A mechanism was added to help "migrate" old notifications that had `androidAllowWhileIdle` specified but didn't account for how there are recurring notifications that were scheduled using older versions of the plugin prior to `androidAllowWhile` being added. This hotfix has been taken from the 16.0.0-dev.2 prerelease and has also been applied to the 14.1.3 hotfix release as well
@@ -25,6 +29,24 @@
2529
* Updated API documentation related to the iOS/macOS notification presentation options to include links to Apple's documentations to show what they correspond to
2630
* Fixed typo in API docs for `initialize()` method
2731

32+
# [14.1.4]
33+
34+
* [Android] fixed issue [2106](https://github.com/MaikuB/flutter_local_notifications/issues/2106) where calling `getNotificationChannels()` reports the wrong importance level or result in an exception if the importance level was unspecified. This hotfix has been taken from the 16.0.0-dev.3 prerelease
35+
36+
# [14.1.3+1]
37+
38+
* Removed duplicate changelog entry on example app being updated
39+
40+
41+
# [14.1.3]
42+
43+
* [Android] fixed issue an issue similar to [2033](https://github.com/MaikuB/flutter_local_notifications/issues/2033) that was addressed in 15.0.1 where notifications on scheduled using older version of the plugin via the `periodicallyShow()` method would fail to have the next subsequent ones scheduled. This issue started occuring in 14.0 where support for inexact notifications was added using the `ScheduleMode` enum that was added and resulted in the deprecation of `androidAllowWhileIdle`. A mechanism was added to help "migrate" old notifications that had `androidAllowWhileIdle` specified but didn't account for how there are recurring notifications that were scheduled using older versions of the plugin prior to `androidAllowWhile` being added. This hotfix has been taken from the 16.0.0-dev.2 prerelease
44+
* Updated example app so that the Android side specifies minimum SDK version version that aligns with what's specified by the Flutter SDK. This has been taken from the 16.0.0-dev.2 prerelease to allow the example app to build using recent versions where the minimum Android SDK version has changed from 16 to 19
45+
46+
# [14.1.2]
47+
48+
* [Android] Fixed issue [2033](https://github.com/MaikuB/flutter_local_notifications/issues/2033) where notifications on scheduled using older version of the plugin would fail to have the next subsequent ones scheduled. This issue started occuring in 14.0 where support for inexact notifications was added using the `ScheduleMode` enum that was added and resulted in the deprecation of `androidAllowWhileIdle`. A mechanism was added to help "migrate" old notifications that had `androidAllowWhileIdle` specified but didn't account for how there are recurring notifications that were scheduled using older versions of the plugin prior to `androidAllowWhile` being added. This fix has been taken from the 15.0.1 release as a hotfix
49+
2850
# [14.1.1]
2951

3052
* Fixed typo in API docs for the deprecated `showDailyAtTime()` method. Thanks to the PR from [Yuichiro Kawano](https://github.com/yu1ro)

flutter_local_notifications/lib/src/platform_flutter_local_notifications.dart

+3-1
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,9 @@ class AndroidFlutterLocalNotificationsPlugin
458458
description: a['description'],
459459
groupId: a['groupId'],
460460
showBadge: a['showBadge'],
461-
importance: Importance.values[a['importance']],
461+
importance: Importance.values
462+
// ignore: always_specify_types
463+
.firstWhere((i) => i.value == a['importance']),
462464
playSound: a['playSound'],
463465
sound: _getNotificationChannelSound(a),
464466
enableLights: a['enableLights'],

flutter_local_notifications/pubspec.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: flutter_local_notifications
22
description: A cross platform plugin for displaying and scheduling local
33
notifications for Flutter applications with the ability to customise for each
44
platform.
5-
version: 15.1.1
5+
version: 15.1.2
66
homepage: https://github.com/MaikuB/flutter_local_notifications/tree/master/flutter_local_notifications
77
issue_tracker: https://github.com/MaikuB/flutter_local_notifications/issues
88

0 commit comments

Comments
 (0)