You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The description field is optional, according to the documentation. Previously, we created channels with an empty description, and after migrating the library to null safety, errors appeared when receiving the channels list:
PlatformException
PlatformException(error, Unsupported value: [Ljava.lang.StackTraceElement;@cafd342, null, java.lang.IllegalArgumentException: Unsupported value: [Ljava.lang.StackTraceElement;@cafd342
at f.a.c.a.r.o(Unknown Source:396)
at f.a.c.a.s.c(Unknown Source:37)
at f.a.c.a.j$a$a.c(Unknown Source:10)
at com.dexterous.flutterlocalnotifications.FlutterLocalNotificationsPlugin.getNotificationChannels(Unknown Source:54)
at com.dexterous.flutterlocalnotifications.FlutterLocalNotificationsPlugin.onMethodCall(Unknown Source:291)
at f.a.c.a.j$a.a(Unknown Source:17)
at io.flutter.embedding.engine.e.b.e(Unknown Source:57)
at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(Unknown Source:4)
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:336)
at android.os.Looper.loop(Looper.java:197)
at android.app.ActivityThread.main(ActivityThread.java:7948)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1075)
or
_TypeError: type 'Null' is not a subtype of type 'String'
File "platform_flutter_local_notifications.dart", line 331, in AndroidFlutterLocalNotificationsPlugin.getNotificationChannels.<fn>
File "iterable.dart", line 412, in MappedListIterable.elementAt
File "iterable.dart", line 341, in ListIterator.moveNext
File "growable_array.dart", line 188, in new _GrowableList._ofEfficientLengthIterable
File "growable_array.dart", line 150, in new _GrowableList.of
File "array_patch.dart", line 50, in new List.of
File "set.dart", line 118, in SetMixin.toList
File "platform_flutter_local_notifications.dart", line 342, in AndroidFlutterLocalNotificationsPlugin.getNotificationChannels
File "<asynchronous suspension>"
File "notification_service.dart", line 77, in NotificationService._initializeChannels
File "<asynchronous suspension>"
File "notification_service.dart", line 66, in NotificationService._initialize
Thanks for identifying this, as this is a breaking change this requires a major version bump so I'll look at including this in the 9.0.0 release. As there's already a 9.0.0 prerelease at the moment, this will be where the fix will go at the moment. Note that this is currently remaining a prerelease until Android 12 becomes stable
Describe the bug
The description field is optional, according to the documentation. Previously, we created channels with an empty description, and after migrating the library to null safety, errors appeared when receiving the channels list:
or
To Reproduce
https://github.com/MaikuB/flutter_local_notifications/blob/master/flutter_local_notifications/lib/src/platform_specifics/android/notification_channel.dart#L13
Expected behavior
Android notification channel description should not be a required field.
https://developer.android.com/reference/android/app/NotificationChannel
The text was updated successfully, but these errors were encountered: