Badge
A small count/status pill in four sizes, including an outlined look.
CLI
Install this component into your project:
badge
$
flutter_beautify add badgeVariants
FBBadge.standard() · FBBadge.small() · FBBadge.large() · FBBadge.outlined()
Key parameters
| Parameter | Type | Default |
|---|---|---|
label | String | required |
backgroundColor | Color? | ambient colorScheme.error |
textColor | Color? | 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());