Skip to content
pubscout

flutter_native_badge

2.1.0, released 4 weeks ago by an unverified publisher

Flutter plugin to set, clear, and query app icon badge counts on iOS, macOS, and Android.

WASM-ready
$ flutter pub add flutter_native_badge
Source repository

What it does

Provides a Dart API to display numeric badges or a red dot on the app icon, clear the badge, and request the required notification permissions. It abstracts the native badge implementations for iOS, macOS, and Android launchers.

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

Use it when

  • You need a native app‑icon badge on iOS, macOS, or Android without writing platform code
  • You want a simple, synchronous check for badge support and a unified API across platforms

Skip it when

  • Your app runs only on web or desktop platforms that don’t show app‑icon badges
  • You need custom in‑app notification UI or full notification handling beyond a badge

Strengths

  • Cross‑platform (iOS, macOS, Android) support
  • Handles Android launcher differences automatically
  • Simple, imperative API with no code generation

Weaknesses

  • Android implementation uses a silent notification that may appear in the shade
  • getBadgeCount is deprecated on iOS and returns only the last set value on Android
  • No web support

Setup

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

Add POST_NOTIFICATIONS permission to AndroidManifest for API 33+, call requestPermission() on iOS/macOS as needed; optional Swift Package Manager or CocoaPods for iOS/macOS integration

import 'package:flutter_native_badge/flutter_native_badge.dart';

if (FlutterNativeBadge.isSupported) {
  await FlutterNativeBadge.requestPermission();
  await FlutterNativeBadge.setBadgeCount(5);
  await FlutterNativeBadge.clearBadgeCount();
}

Alternatives

Packages that do the same job and could replace flutter_native_badge.