搜索插件、代码仓与 APP 分类

GitHub 代码仓windows7lake/app_badge_plus

app_badge_plus

一个用于在应用图标上添加徽章的 Flutter 插件。

app_badge_plus 项目封面
星标
34
复刻
24
最近推送(UTC)
2026年9月7日
项目状态
未归档

原始 README

以下为英文项目原文快照,最新内容请访问 GitHub。

app_badge_plus

Pub Version Pub Points GitHub

A Flutter plugin for adding badges to your app icon. Supports iOS, Android, and macOS.

iOS pixel samsung macOS

Supported Platforms

  • iOS
  • Android
    • Samsung (pass)
    • Oppo (pass)
    • Vivo (pass)
    • Huawei (pass)
    • Xiaomi / POCO (HyperOS)
    • LG
    • Sony
    • HTC
    • ZTX
  • macOS

Mark

Android

Starting with Android 8.0 (API level 26), notification badges—also known as notification dots—appear on a launcher icon when the associated app has an active notification. Users can touch & hold the app icon to reveal the notifications, along with any app shortcuts.

https://developer.android.com/develop/ui/views/notifications/badges

Starting With Android13 (API level 33), notification runtime permission should be requested before setting the app badge.

On POCO / Xiaomi HyperOS, numeric badges are driven by active notifications (the old extraNotification API is unavailable). Grant notification permission and enable the numeric badge style in system settings.

Add the following permissions to AndroidManifest.xml according to the system you need to support:

<!-- Samsung -->
<uses-permission android:name="com.sec.android.provider.badge.permission.READ"/>
<uses-permission android:name="com.sec.android.provider.badge.permission.WRITE"/>

<!-- HTC -->
<uses-permission android:name="com.htc.launcher.permission.READ_SETTINGS"/>
<uses-permission android:name="com.htc.launcher.permission.UPDATE_SHORTCUT"/>

<!-- Sony -->
<uses-permission android:name="com.sonyericsson.home.permission.BROADCAST_BADGE"/>
<uses-permission android:name="com.sonymobile.home.permission.PROVIDER_INSERT_BADGE"/>

<!-- Apex -->
<uses-permission android:name="com.anddoes.launcher.permission.UPDATE_COUNT"/>

<!-- Solid -->
<uses-permission android:name="com.majeur.launcher.permission.UPDATE_BADGE"/>

<!-- Huawei -->
<uses-permission android:name="com.huawei.android.launcher.permission.CHANGE_BADGE" />
<uses-permission android:name="com.huawei.android.launcher.permission.READ_SETTINGS" />
<uses-permission android:name="com.huawei.android.launcher.permission.WRITE_SETTINGS" />
iOS

On iOS, when using with notification message, notification permission is required.

macOS

On macOS, when using with notification message, notification permission is required.

permission_handler

Using permission_handler package to manage permission on Android and iOS.

https://pub.dev/packages/permission_handler

Usage

To use this plugin, add app_badge_plus as a dependency in your pubspec.yaml file.

dependencies:
  app_badge_plus: ^1.1.2

Example

import 'package:app_badge_plus/app_badge_plus.dart';

// Set badge
AppBadgePlus.updateBadge(5);

// Remove badge
AppBadgePlus.updateBadge(0);

// Whether the launcher supports badges. It always returns true on iOS and it will return false on Android if the launcher doesn't support badges.
AppBadgePlus.isSupported();

Compare

flutter_app_badger

https://pub.dev/packages/flutter_app_badger

Set badge
FlutterAppBadger.updateBadgeCount(1);

replace to

AppBadgePlus.updateBadge(1);
Remove badge
FlutterAppBadger.removeBadge();

replace to

AppBadgePlus.updateBadge(0);
Device support
FlutterAppBadger.isAppBadgeSupported();

using dart API:

import 'dart:io';

Platform.isAndroid || Platform.isIOS
windows7lake GitHub avatar
GitHub 作者

windows7lake ↗

语言KotlinDartSwiftRubyObjective-C

此仓库发布的插件

使用的依赖

依赖清单 4 项

  • flutter{"sdk":"flutter"}
  • plugin_platform_interface^2.1.8
  • flutter_test开发依赖{"sdk":"flutter"}
  • flutter_lints开发依赖^5.0.0

如何选择适合项目的代码仓?

先按使用场景筛选,再比较项目活跃情况,最后到原始仓库核对使用要求。

  1. 通过仓库名、作者或描述搜索,再按技术分类缩小范围。
  2. 结合星标、复刻与最近推送比较项目;星标反映社区关注,不代表质量保证。
  3. 使用前在 GitHub 核对 README、许可证与 Issues。

来源与维护

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗