Skip to content
Get started
Menu
Get started

Inline

Text roles for payment instructions and references.

Inline payment text with semantic roles, colors, weights, tabular digits and a formatted payment deadline.Inline payment text with semantic roles, colors, weights, tabular digits and a formatted payment deadline.
Inline
Inline weights, tabular digits, text roles, semantic colors, a reference and a formatted payment deadline at 200 percent text. Part 1 of 2.Continued: Inline weights, tabular digits, text roles, semantic colors, a reference and a formatted payment deadline at 200 percent text. Part 2 of 2.
200% text Shown in 2 images, top to bottom; each repeats the last few lines of the one before.
example/lib/screens/gallery_layout.dart
PaymentInline('Total');

Variants: nine text roles; regular, semibold, bold.

Use title for a page title, heading for headings and subheadings, body for running text (semibold for emphasis), caption for supporting text and tag for a short label above a heading. Payment totals and entered amounts use amountLarge; the single screen amount uses display.

Situation Variant / composition Payment example
Amount label with supporting copy body Use the nine PaymentType roles and semantic text colors.

Use Amount text for currency formatting.

Inline text displays its supplied content and type role. It has no loading or interaction state.

Do: Use the nine PaymentType roles and semantic text colors.

Don’t: Invent lead/kicker roles or raw font sizes.

Use the role for the text’s place in the hierarchy. Use AmountText when the value needs currency formatting.

Preserve reading order and allow text to wrap. Use text labels rather than color alone to communicate status.

PaymentInline

class PaymentInline extends StatelessWidget · lib/src/layout/layout.dart

Text in one type role.

ParameterTypeDefaultDescription
textrequiredpositionalString?—text for this text.
role:PaymentTextRolePaymentTextRole.bodyrole for this text.
weight:PaymentFontWeight?—weight for this text.
color:PaymentTextColor?—color for this text.
tabular:boolfalsetabular for this text.
reference:boolfalsereference for this text.
maxLines:int?—maxLines for this text.
textAlign:TextAlign?—textAlign for this text.

PaymentInline.rich(…)

ParameterTypeDefaultDescription
spansrequiredpositionalList<PaymentSpan>—spans for this text.
role:PaymentTextRolePaymentTextRole.bodyrole for this text.

PaymentSpan

class PaymentSpan · lib/src/layout/layout.dart

One styled run in rich inline text.

ParameterTypeDefaultDescription
textrequiredpositionalString—Text content.
weight:PaymentFontWeight?—Running emphasis.
color:PaymentTextColor?—Semantic color.
reference:boolfalseUse the reference face.

PaymentTextRole

enum PaymentTextRole · lib/src/foundation/payment_tokens.dart

The nine PaymentType roles; no additional role exists.

ValueDescription
displaydisplay: one display amount.
amountLargeamountLarge: totals and balances.
titletitle: sheet and app-bar titles.
headingheading: section titles.
bodybodyFor(context): paragraphs.
labellabel: row labels and values.
captioncaption: supporting text.
tagtag: short status words.
inputinput: field text.

PaymentTextColor

enum PaymentTextColor · lib/src/foundation/payment_tokens.dart

Semantic text and icon colors.

ValueDescription
primarytextPrimary.
secondarytextSecondary.
disableddisabled.
accentaccent.
infoinfo.foreground.
successsuccess.foreground.
warningwarning.foreground.
dangerdanger.foreground.

PaymentFontWeight

enum PaymentFontWeight · lib/src/foundation/payment_tokens.dart

Running-text emphasis only; choose a PaymentType role for hierarchy.

ValueDescription
regularFontWeight.w400.
semiboldFontWeight.w600.
boldFontWeight.w700; emphasis inside running text only.