Skip to content
pubscout

badges

4.0.1, released 8 weeks ago by yako.dev

A Flutter widget to display customizable badges on any widget.

WASM-readyUses material_ui
$ flutter pub add badges
Source repository

What it does

It provides a Badge widget that can overlay a number, icon, or custom content on another widget. The badge’s position, shape, color, animation and tap behavior are fully configurable. It works on all Flutter platforms.

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

Use it when

  • Showing notification counts (e.g., cart items)
  • Highlighting new or important UI elements
  • Indicating status or selection with a small overlay

Skip it when

  • You need system‑level app icon badges
  • You already use Flutter's built‑in Badge and don’t need extra features
  • Project constraints prevent adding material_ui or raising the SDK

Strengths

  • Highly customizable appearance and animation
  • Works across Android, iOS, web, desktop
  • Resolves naming conflict with Material’s Badge

Weaknesses

  • Requires material_ui and a higher minimum SDK
  • Adds extra dependency and bundle size
  • Only a UI overlay, not a system badge

Setup

Kind
Flutter widgets
Effort
Medium
Code generation
No
Direct dependencies
1

Add badges ^4.0.0 to pubspec, import with a namespace or hide Material's Badge, ensure material_ui is available (minimum Dart 3.13, Flutter 3.47).

badges.Badge(
  badgeContent: Text('3'),
  child: Icon(Icons.settings),
);

Alternatives

Packages that do the same job and could replace badges.

  • home_widget

    Provides app‑icon badge support and other home‑screen widgets, useful when you need system‑level badges instead of in‑app UI overlays.

Works with

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