用户可借助此项目轻松实现 iOS 应用角标数字的添加与移除功能。该项目作为 flutter_app_badger 的分支插件,核心功能是提供角标数字更新能力,使用时会自动请求通知权限,且需在 XCode 中配置远程通知或修改 Info.plist 文件。【此简介由AI生成】
Access rate limit exceeded. Please log in to continue.
Flutter app badge plugin
Fork of flutter_app_badger.
This plugin for Flutter adds the ability to change the badge of the IOS app.
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.
Enable Remote notification in XCode:

Or add in <project>/ios/Runner/Info.plist:
<key>UIBackgroundModes</key>
<array>
<string>remote-notification</string>
</array>
Dart
First, you just have to import the package in your dart files with:
import 'package:flutter_app_badge/flutter_app_badge.dart';
Then you can add a badge:
FlutterAppBadge.count(1);
Remove a badge:
FlutterAppBadge.count(0);