I created my app Icon using flutter_launcher_icons
flutter_launcher_icons:
android: true
ios: false
image_path: 'assets/icon/gradiary_icon.png'
adaptive_icon_background: '#ffffff'
min_sdk_android: 21 # android min sdk min:16, default 21
this replaced the default flutter icon.
Since I'm using awesome_notification, i have this initialization code
Future<void> initialiseNotifications() async {
await AwesomeNotifications().initialize(
null,
[
NotificationChannel(
channelKey: 'reflection',
channelName: 'Reflection Channel',
channelDescription: 'Channel for reflection notifications',
defaultColor: Colors.purple,
ledColor: Colors.purple,
enableVibration: true,
defaultRingtoneType: DefaultRingtoneType.Alarm,
),
As you can see there ist "null" as the default icon, which worked before. But when I run a notification i get this error:
Invalid notification (no valid small icon):
In my src/main/res folder there is my the icon in each mipmap folder.
How can i fix this?
If You are using the awesome_notification package so while intialising the package inside your project just spacify the res/drawable/image_name location inside that function.
Note: Image should be transparent and should be present at that location.