3

I am using the firebase with my flutter application. The application is built for both iOS & Android platforms. Upon receiving the notification, if I click on the notification, the notification icon from the status bar removes including the notification count badge from the app launcher icon.

But, if I tap on the launcher icon instead of the notification, the notification icon in the status bar remains including the notification count badge in the app launcher icon.

As per the documentation, to solve the issue, this is what I have done so far:

import ...
import 'package:flutter_app_badger/flutter_app_badger.dart';
import ...

removeTheNotifications() async {
    if(await FlutterAppBadger.isAppBadgeSupported()){
      FlutterAppBadger.updateBadgeCount(0);
      FlutterAppBadger.removeBadge();
    }
}

And calling this method in the build function of the flutter screen:

removeTheNotifications();

But it makes no difference and does not work. Thanks

Dharman
  • 30,962
  • 25
  • 85
  • 135
Stack Overflow
  • 1
  • 5
  • 23
  • 51

0 Answers0