Skip to content
pubscout

flutter_new_badger

2.0.0, released 4 months ago by an unverified publisher

Handle app icon badges for iOS, macOS, and Android

WASM-ready
$ flutter pub add flutter_new_badger
Source repository

What it does

A Flutter plugin to set, get, increment, decrement, and remove app icon badges on iOS, macOS, and supported Android devices. It provides an imperative API for interacting with native badge counts.

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

Use it when

  • You need to display unread message counts or alerts on your app icon on iOS and macOS.
  • You want to manage badge numbers using simple asynchronous Dart methods.

Skip it when

  • Your target audience primarily uses stock Android or Xiaomi devices where arbitrary numeric badges are not supported by the OS.
  • You require complex notification rendering beyond simple app icon badge updates.

Strengths

  • Supports iOS, macOS, and several Android launchers.
  • Provides simple utility methods like increment and decrement for badge management.
  • Supports Swift Package Manager and CocoaPods on Apple platforms.

Weaknesses

  • Android support depends heavily on the device manufacturer's launcher and has many unsupported environments (like Pixel stock Android and Xiaomi).
  • Requires platform-specific permissions and manual manifest/Info.plist configuration.

Setup

Kind
Plugin (native code)
Effort
Medium
Code generation
No
Direct dependencies
1

Requires adding notification permissions for iOS and specific broadcast/provider permissions in AndroidManifest.xml depending on target launcher requirements.

import 'package:flutter_new_badger/flutter_new_badger.dart';

// Set a badge
FlutterNewBadger.setBadge(1);

// Get current badge
int? badge = await FlutterNewBadger.getBadge();

Alternatives

Packages that do the same job and could replace flutter_new_badger.

Works with

Packages commonly used together with flutter_new_badger: ones it builds on, ones built on it, and its own family.