Badge
PaymentBadge names the state of one thing, such as a pending payment or a refund, with an icon, a short label and a tone. The label carries the meaning; the tone only supports it.



PaymentBadge.urgent(label: 'Action required');Variants
Section titled “Variants”Variants: neutral, info, success, warning, danger, urgent.
StatusTone has five values. Each one picks a foreground and container pair from PaymentTheme.
| Tone | Use it for |
|---|---|
neutral |
A state with no judgement: draft, canceled by the customer, unavailable. |
info |
Something to know that needs no action. |
success |
A settled, confirmed result your host reported. |
warning |
Waiting, or a result not known yet. |
danger |
Failed, rejected or expired. |
Never pick success from what the UI saw (an upload finished, a button was pressed). Use it only when your host’s snapshot says so.
Urgent and icons
Section titled “Urgent and icons”Use urgent only when a person must act now to continue. Use schedule plus “Pending” for a bank wait, and help_outline plus “Not confirmed” when the result is unknown. Do not use a badge as the only failure explanation. Icons scale with text up to 1.6×.
Which variant when
Section titled “Which variant when”| Situation | Variant / composition | Payment example |
|---|---|---|
| Unresolved transaction status | warning | Pair the tone with a status word; urgent is reserved for immediate danger. |
Use Banner for a sentence about the screen.
States
Section titled “States”Choose the tone, icon and label from the host status. A finished upload or button press does not establish payment success or identity verification.
Do and don’t
Section titled “Do and don’t”Do: Pair the tone with a status word; urgent is reserved for immediate danger.
Don’t: Show color without a readable status label.
Content guidelines
Section titled “Content guidelines”- One or two words in sentence case: “Pending”, “Refunded”, “Not confirmed”.
- Pick an icon that agrees with the word. The icon and the label are what make the status readable without color.
- Do not put amounts or dates in a badge. Use an info row.
Accessibility
Section titled “Accessibility”- Icon, label and tone are three signals, so the status never depends on color alone.
- Tone foregrounds are contrast-checked: at least 5.8:1 on white in light mode and 7.6:1 on
#131417in dark mode. - The badge is text: screen readers read its label.
PaymentBadge
class PaymentBadge extends StatelessWidget · lib/src/foundation/primitives.dart
Small tag showing a status with icon and text; color only supports the label.
| Parameter | Type | Default | Description |
|---|---|---|---|
tone:required | StatusTone | — | — |
label:required | String | — | — |
icon: | IconData? | — | — |
PaymentBadge.urgent(…)
| Parameter | Type | Default | Description |
|---|---|---|---|
label:required | String | — | — |
icon: | IconData? | — | — |
StatusTone
enum StatusTone · lib/src/foundation/payment_theme.dart
Semantic tone of a status. Widgets always pair a tone with an icon and a text label, so color is never the only signal.
| Value | Description |
|---|---|
neutral | — |
info | — |
success | — |
warning | — |
danger | — |
Migration
Section titled “Migration”StatusBadge is a deprecated alias. Replace the constructor name with PaymentBadge; existing arguments keep compiling.
See also
Section titled “See also”- Status header for the status at the top of a screen.
- Notice banner when the status needs an explanation.