Support to update the app badge on the launcher (both for Android and iOS)
Switch branches/tags
Nothing to show
Clone or download
Latest commit 3e189f5 Jul 5, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
android Android library forked to fix some issues with Oreo devices Jul 5, 2018
assets Initial release Apr 10, 2018
example Remove unused files Jul 5, 2018
ios Initial release Apr 10, 2018
lib Remove unused files Jul 5, 2018
res/values Initial release Apr 10, 2018
.gitignore Initial release Apr 10, 2018
CHANGELOG.md 1.0.2 release Jul 5, 2018
LICENSE Initial release Apr 10, 2018
README.md Update README.md Apr 10, 2018
flutter_app_badger.iml Initial release Apr 10, 2018
flutter_app_badger_android.iml Initial release Apr 10, 2018
pubspec.yaml 1.0.2 release Jul 5, 2018

README.md

Flutter App Badger plugin

This plugin for Flutter adds the ability to change the badge of the app in the launcher. It supports iOS 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 Info.plist:

<key>UIBackgroundModes</key>
    <array>
        <string>remote-notification</string>
    </array>

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:flutterappbadger/flutterappbadger.dart';

Then you can add a badge:

FlutterAppBadger.updateBadgeCount(1);

Remove a badge:

FlutterAppBadger.removeBadge();

Or just check if the device supports this feature with:

FlutterAppBadger.isAppBadgeSupported();