Skip to content
Get started
Menu
Get started

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.

Canceled, in review, paid, pending, failed, not confirmed and action required status badges.Canceled, in review, paid, pending, failed, not confirmed and action required status badges.
Badge
Canceled, in review, paid, pending, failed, not confirmed and action required status badges at 200 percent text.
200% text
example/lib/screens/gallery_feedback.dart
PaymentBadge.urgent(label: 'Action required');

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.

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×.

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.

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: Pair the tone with a status word; urgent is reserved for immediate danger.

Don’t: Show color without a readable status label.

  • 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.
  • 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 #131417 in 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.

ParameterTypeDefaultDescription
tone:requiredStatusTone——
label:requiredString——
icon:IconData?——

PaymentBadge.urgent(…)

ParameterTypeDefaultDescription
label:requiredString——
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.

ValueDescription
neutral—
info—
success—
warning—
danger—

StatusBadge is a deprecated alias. Replace the constructor name with PaymentBadge; existing arguments keep compiling.