flutter_app_badger_plus 1.0.1 copy "flutter_app_badger_plus: ^1.0.1" to clipboard
flutter_app_badger_plus: ^1.0.1 copied to clipboard

Flutter 升级3.35.7之后,对flutter_app_badger插件的升级(After Flutter upgrade 3.35.7, the upgrade of flutter_app_badger plugins.)。

Flutter App Badger Plus plugin (UNMAINTAINED) #

技术支持邮箱(1539841933@qq.com)。 #

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>

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>

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_plus/flutter_app_badger_plus.dart';

Then you can add a badge:

FlutterAppBadgerPlus.updateBadgeCount(1);

Remove a badge:

FlutterAppBadgerPlus.removeBadge();

Or just check if the device supports this feature with:

FlutterAppBadgerPlus.isAppBadgeSupported();
0
likes
125
points
62
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Flutter 升级3.35.7之后,对flutter_app_badger插件的升级(After Flutter upgrade 3.35.7, the upgrade of flutter_app_badger plugins.)。

Repository (GitHub)
View/report issues

License

Apache-2.0 (license)

Dependencies

flutter

More

Packages that depend on flutter_app_badger_plus

Packages that implement flutter_app_badger_plus