DigitalInnovationGroup/flutter_app_badge
支援在 iOS 上更新應用程式徽章
- Stars
- 2
- Forks
- 1
- 最近推送(UTC)
- 2023年7月21日
- 專案狀態
- 未封存
語言DartObjective-CRuby
技術主題
使用的依賴
依賴清單 1 項
- flutter
{"sdk":"flutter"}
原始 README
以下為英文專案原文快照,最新內容請造訪 GitHub。
展開 / 收合專案 README
Flutter app badge plugin
Fork of flutter_app_badger.
This plugin for Flutter adds the ability to change the badge of the IOS app.
Ios 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.
Enable Remote notification in XCode:
IOS Remote notification
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);