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
The error would be indicative of not having specialised the notification icon correctly by having an appropriate drawable source and specify the name of said resource that is typically by calling the initialize API and specifying the default icon for all notifications. Please check that you have done this. If you believe you have then please provide a link to a repository hosting a minimal app that can reproduce the issue
Getting nullpointer exception while showing the notification:
I/flutter ( 7621): PlatformException(error, Attempt to invoke virtual method 'int java.lang.Integer.intValue()' on a null object reference, null, java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.Integer.intValue()' on a null object reference
I/flutter ( 7621): at com.dexterous.flutterlocalnotifications.FlutterLocalNotificationsPlugin.setSmallIcon(FlutterLocalNotificationsPlugin.java:425)
I/flutter ( 7621): at com.dexterous.flutterlocalnotifications.FlutterLocalNotificationsPlugin.createNotification(FlutterLocalNotificationsPlugin.java:326)
I/flutter ( 7621): at com.dexterous.flutterlocalnotifications.FlutterLocalNotificationsPlugin.showNotification(FlutterLocalNotificationsPlugin.java:1146)
I/flutter ( 7621): at com.dexterous.flutterlocalnotifications.FlutterLocalNotificationsPlugin.show(FlutterLocalNotificationsPlugin.java:1462)
I/flutter ( 7621): at com.dexterous.flutterlocalnotifications.FlutterLocalNotificationsPlugin.onMethodCall(FlutterLocalNotificationsPlugin.java:1299)
I/flutter ( 7621): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:258)
I/flutter ( 7621): at io
I/flutter ( 7621): #0 StandardMethodCodec.decodeEnvelope
message_codecs.dart:653
I/flutter ( 7621): #1 MethodChannel._invokeMethod
platform_channel.dart:315
I/flutter ( 7621):
I/flutter ( 7621): #2 FlutterLocalNotificationsPlugin.show
flutter_local_notifications_plugin.dart:239
showing the notification by below mentioned code
AndroidNotificationDetails androidNotificationDetails =
AndroidNotificationDetails(
color: Colors.blue,
channel.id,
channel.name,
channelDescription: APPConstants.firebaseNotificationChannelDescription,
importance: Importance.max,
priority: Priority.high,
ticker: 'ticker',
);
NotificationDetails notificationDetails =
NotificationDetails(android: androidNotificationDetails);
// flutterLocalNotificationsPlugin.show(notification.hashCode,
// notification.title, notification.body, notificationDetails);
flutterLocalNotificationsPlugin.show(
1, 'notification', 'plain body', notificationDetails,
payload: 'item x');
}
The text was updated successfully, but these errors were encountered: