FLUTTER ECOSYSTEM

DigitalInnovationGroup/flutter_app_badge

支持在 iOS 上更新应用徽章

flutter_app_badge 项目封面
Stars
2
Forks
1
最近推送(UTC)
2023年7月21日
项目状态
未归档
DigitalInnovationGroup GitHub avatar
GITHUB Organization

DigitalInnovationGroup ↗

语言DartObjective-CRuby

技术话题

使用的依赖

依赖清单 1 项
  • flutter{"sdk":"flutter"}

原始 README

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

展开 / 收起项目 README

Flutter app badge plugin

Pub

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);