flutter_app_badger 1.5.0 copy "flutter_app_badger: ^1.5.0" to clipboard
flutter_app_badger: ^1.5.0 copied to clipboard

discontinued

Plugin to update the app badge on the launcher (both for Android, iOS and macOS)

Flutter App Badger plugin #

Pub

This plugin for Flutter adds the ability to change the badge of the app in the launcher. It supports iOS, macOS, and some Android devices (the official API does not support the feature, even on Oreo).

Android badge

Android badge

Getting Started #

iOS #

On iOS, the notification permission is required to update the badge. It is automatically asked when the badge is added or removed.

Please also add the following to your

<key>UIBackgroundModes</key>
    <array>
        <string>remote-notification</string>
    </array>
copied to clipboard

macOS #

On macOS, the notification permission is required to update the badge. It is automatically asked when the badge is added or removed.

Please also add the following to your

<key>NSUserNotificationAlertStyle</key>
<string>banner</string>
copied to clipboard

Android #

On Android, no official API exists to show a badge in the launcher. But some devices (Samsung, HTC...) support the feature. Thanks to the Shortcut Badger library, ~ 16 launchers are supported.

Dart #

First, you just have to import the package in your dart files with:

import 'package:flutter_app_badger/flutter_app_badger.dart';
copied to clipboard

Then you can add a badge:

FlutterAppBadger.updateBadgeCount(1);
copied to clipboard

Remove a badge:

FlutterAppBadger.removeBadge();
copied to clipboard

Or just check if the device supports this feature with:

FlutterAppBadger.isAppBadgeSupported();
copied to clipboard
889
likes
140
points
210k
downloads

Publisher

verified publisherdaad.mobi

Weekly Downloads

2024.09.06 - 2025.03.21

Plugin to update the app badge on the launcher (both for Android, iOS and macOS)

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (license)

Dependencies

flutter

More

Packages that depend on flutter_app_badger