Skip to content
pubscout

flutter_app_badge

2.0.2, released 3 years ago by an unverified publisher

Update the app badge on the launcher for iOS and macOS.

$ flutter pub add flutter_app_badge
Source repository

What it does

Allows Flutter applications to update or remove the badge count on the launcher for iOS and macOS platforms. It provides straightforward methods to set a specific badge count or reset it to zero.

AI-written summary of version 2.0.2, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need to show unread message or notification counts on your app icon on iOS and macOS
  • You want a simple API to add or remove app badges imperatively

Skip it when

  • Your target platform is Android or other platforms not supported by this plugin
  • You need a comprehensive state-management or complex notification system

Strengths

  • Simple and straightforward API for badge manipulation
  • Supports both iOS and macOS platforms

Weaknesses

  • Non-iOS implementations were removed in version 2.0.0
  • Requires manual native setup including notification permissions on iOS

Setup

Kind
Plugin (native code)
Effort
Low
Code generation
No
Direct dependencies
0

On iOS, notification permission is required and automatically requested, but you may need to enable Remote notification in Xcode or add UIBackgroundModes to Info.plist.

import 'package:flutter_app_badge/flutter_app_badge.dart';

// Add a badge
FlutterAppBadge.count(1);

// Remove a badge
FlutterAppBadge.count(0);

Alternatives

Packages that do the same job and could replace flutter_app_badge.