Record card
PaymentRecordCard gives a saved record one surface for its title, metadata and actions. Only the body opens the record; the trailing slot and footer operate independently.
PaymentRecordCard( leading: const PaymentIcon(Icons.description_outlined), title: const Text('Settlement statement'), metadata: const Text('November 2026 · PDF'), onOpen: openStatement, trailing: PaymentIconButton( icon: Icons.delete_outline, tooltip: 'Remove statement', onPressed: confirmRemoval, ), footer: Align( alignment: AlignmentDirectional.centerStart, child: PaymentLink(label: 'Download', onPressed: downloadStatement), ),);The card uses the nearest PaymentTheme for its surface, outline, spacing and radii, and PaymentType for heading and caption defaults. Pass your own slot widgets to customize content. The card does not fetch, open or delete records itself.
Match a host brand
Section titled “Match a host brand”Set hugTrailing: true for a compact control such as an icon button. The slot takes only the width its child needs, up to the usual one-third limit after the gap. A child that fills its slot keeps the full allocation. Use style for appearance changes that apply only to this card:
PaymentRecordCard( title: const Text('Settlement statement'), metadata: const Text('November 2026 · PDF'), hugTrailing: true, style: const PaymentRecordCardStyle( titleStyle: TextStyle(fontWeight: FontWeight.w700), metadataStyle: TextStyle(fontStyle: FontStyle.italic), inset: 8, divider: PaymentRecordCardDivider.inset, elevation: 2, ), trailing: PaymentIconButton( icon: Icons.delete_outline, tooltip: 'Remove statement', onPressed: confirmRemoval, ), footer: PaymentLink(label: 'Download', onPressed: downloadStatement),);The styles merge over the kit heading and caption. inset changes the outer padding around the main row and footer, not the spacing inside the title and metadata. When space is tight, the card reduces extra horizontal inset and can stack the trailing control to leave room for the title. The footer rule is full-width by default. Use PaymentRecordCardDivider.inset to align the rule with the footer content or none to omit it. If you set custom text colors, check contrast in both themes.
Variants
Section titled “Variants”- Openable: supply
onOpento make the body a button. - Read-only body: omit
onOpen. Trailing and footer controls still work if supplied.
Which variant when
Section titled “Which variant when”Use an openable card when a record has a detail view. Use a read-only body when there’s no detail view but its actions are still useful. Use a flat list item for simple navigation rows that don’t need a separate footer.
States
Section titled “States”The body is either openable or read-only. Each action slot owns its own disabled, progress or feedback state. The trailing slot moves below the body at large text sizes or when it would have less than 48 dp in the row, even with hugTrailing. Give the card at least 48 dp of width to fit a standard tap target. In containers that size themselves to their content, such as a Flutter AlertDialog, give the card an explicit width if it has a trailing slot or a custom style.inset.
Do and don’t
Section titled “Do and don’t”Do put buttons and links in the trailing slot or footer.
Don’t nest a control in the title, leading or metadata slots, or put a tap handler around the whole card.
Content guidelines
Section titled “Content guidelines”Use the name of the record as the title, and keep supporting facts such as date or format in metadata. Keep the leading visual decorative; it fits within a 40 × 40 dp tile so the title has room. Name icon-only actions for what they do, such as “Remove statement.”
Accessibility
Section titled “Accessibility”The openable body is a single keyboard- and screen-reader-operable control. By default its name combines the title and metadata; use openLabel if the spoken name needs to differ. The leading visual is excluded from semantics. Supply labelled controls with at least 48 dp targets in the action slots; PaymentIconButton and PaymentLink do this by default.
PaymentRecordCard
class PaymentRecordCard extends StatelessWidget · lib/src/content/record_card.dart
A record surface with a separately actionable body, trailing slot and footer. Only the body opens the record. Use passive widgets for the title, leading visual and metadata, and put controls in trailing or footer.
| Parameter | Type | Default | Description |
|---|---|---|---|
title:required | Widget | — | A record title, styled as a heading by default. |
leading: | Widget? | — | A decorative icon or thumbnail, limited to 40 × 40 dp and not spoken. |
metadata: | Widget? | — | Supporting content below the title, styled as a caption by default. |
trailing: | Widget? | — | An independent end slot. It moves below the body at large text sizes or when the inline slot would be narrower than 48 dp. |
footer: | Widget? | — | An independent full-width slot below a divider. |
onOpen: | VoidCallback? | — | Opens the record from its body. If omitted, the body is read-only. |
openLabel: | String? | — | Replaces the open action's spoken title and metadata, when supplied. |
hugTrailing: | bool | false | Lets an inline trailing slot take only the width its child needs, up to the default one-third allocation. Stacking and tap targets are unchanged. |
style: | PaymentRecordCardStyle | const PaymentRecordCardStyle() | Appearance overrides. Unspecified properties keep the kit defaults. |
PaymentRecordCardStyle
class PaymentRecordCardStyle · lib/src/content/record_card.dart
Optional appearance overrides for a PaymentRecordCard.
| Parameter | Type | Default | Description |
|---|---|---|---|
titleStyle: | TextStyle? | — | Merged over the kit heading style for the title slot. |
metadataStyle: | TextStyle? | — | Merged over the kit caption style for the metadata slot. |
inset: | double? | — | Outer inset in dp around the body row and footer. Defaults to the kit's block spacing. Extra horizontal inset yields to the title and 48 dp action targets when space is tight. |
divider: | PaymentRecordCardDivider | PaymentRecordCardDivider.fullWidth | Divider above the footer. Has no effect without a footer. |
elevation: | double | 0 | Material elevation in dp. Defaults to a flat card. |
PaymentRecordCardDivider
enum PaymentRecordCardDivider · lib/src/content/record_card.dart
Placement of the divider above a PaymentRecordCard footer.
| Value | Description |
|---|---|
fullWidth | Draws the divider across the card, the default. |
inset | Aligns the divider with the footer's horizontal inset. |
none | Does not draw a divider. |