Skip to content

Badge ​

A small count/status pill in four sizes, including an outlined look.

View source on GitHub ↗

CLI ​

Install this component into your project:

badge
$flutter_beautify add badge

Variants ​

FBBadge.standard() · FBBadge.small() · FBBadge.large() · FBBadge.outlined()

Key parameters ​

ParameterTypeDefault
labelStringrequired
backgroundColorColor?ambient colorScheme.error
textColorColor?ambient colorScheme.onError

.outlined() uses borderColor (and textColor) instead of a fill.

Usage ​

dart
import 'package:your_app/widgets/badge.dart';

FBBadge.small(label: unreadCount.toString());

Released under the MIT License.