Skip to content
Get started
Menu
Get started

Detail page table

Payment attempts as a detail module. Variants: pending, ready, empty, error. Composes DataTable with pagination null and no selection. Your app handles row actions, retry and Create. Module errors use warning tone. Extra actions render as a dropdown.

Payment detail table with labelled rows and supporting information. Part 1 of 2.Continued: Payment detail table with labelled rows and supporting information. Part 2 of 2.Payment detail table with labelled rows and supporting information. Part 1 of 2.Continued: Payment detail table with labelled rows and supporting information. Part 2 of 2.
Detail page table Shown in 2 images, top to bottom; each repeats the last few lines of the one before.
Payment detail table with labelled rows and supporting information at 200 percent text. Part 1 of 2.Continued: Payment detail table with labelled rows and supporting information 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_views.dart
PaymentDetailPageTable<int>(
title: 'Attempts',
pending: pending,
errorText: error ? 'Attempts didn’t load' : null,
onRetry: () {},
columns: [
PaymentDataColumn<int>(
key: 'time',
label: 'Time',
value: (r) => DateTime(2026, 10, 1, 10, r),
cell: PaymentCellType.date,
),
PaymentDataColumn<int>(
key: 'method',
label: 'Method',
value: (r) => 'BCA virtual account',
pinned: true,
),
PaymentDataColumn<int>(
key: 'status',
label: 'Status',
value: (r) => r == 3 ? 'Paid' : 'Pending',
cell: PaymentCellType.status,
statusMap: {'Paid': StatusTone.success, 'Pending': StatusTone.warning},
),
PaymentDataColumn<int>(
key: 'amount',
label: 'Amount',
value: (r) => const Money.idr(102500),
cell: PaymentCellType.currency,
),
],
rows: empty ? const [] : const [1, 2, 3],
rowKey: (r) => '$r',
rowActions: [
PaymentRowAction<int>(
id: 'view',
label: 'View attempt',
onPressed: (_) {},
),
],
);

Variants: pending, ready, empty, error.

This detail module composes PaymentDataTable without paging or selection. Use the standalone data table when those interactions are needed.

Situation Variant / composition Payment example
Payment attempts ready Use direct columns and explicit status mapping; the module omits paging and selection.

Use Data table for selectable settlement pages.

Use pending while attempts load. An empty result explains that there are no attempts; a failed load shows a warning and a host retry action.

Do: Use direct columns and explicit status mapping; the module omits paging and selection.

Don’t: Add a duplicate Attempts wrapper heading.

Name each attempt’s reference, method, time and status. Use an explicit unknown label when no result is confirmed.

Keep the attempt status in words and retain column labels when rows collapse on phones.

Show an unknown status as an explicit label in the neutral tone.

Example transaction detail screen with synthetic dataExample transaction detail screen with synthetic data
Example: transaction detail

PaymentDetailPageTable

class PaymentDetailPageTable extends StatelessWidget · lib/src/pages/detail_page_table.dart

A table module with host row actions and no selection or pagination.

ParameterTypeDefaultDescription
title:requiredString—Heading displayed above the content.
pending:requiredbool—Shows placeholders while the host loads content.
columns:requiredList<PaymentDataColumn<T>>—Columns defining how host row values are rendered.
rows:requiredList<T>—Host records displayed by the table module.
rowKey:requiredString Function(T row)—Stable host identifier for each row.
onRowPressed:void Function(T row)?—Opens a host destination for the chosen row.
rowActions:List<PaymentRowActionEntry<T>>const <Never>[]Host actions offered for each record.
onCreate:VoidCallback?—Host action for adding a detail record.
emptyMessage:PaymentEmptyMessage?—Explanation and optional recovery action for missing content.
errorText:String?—Safe error copy displayed with the affected content.
onRetry:VoidCallback?—Retries the failed host request.
extraActions:List<PaymentLink>const []Supporting actions in the module header.

PaymentDataColumn

class PaymentDataColumn · lib/src/content/data_table.dart

One host-owned data column.

ParameterTypeDefaultDescription
key:requiredString—Stable column identifier.
label:requiredString—Visible and spoken label.
value:requiredObject? Function(T row)—Extracts a display value from a host row.
cell:PaymentCellTypePaymentCellType.textPresentation for the extracted value.
statusMap:Map<String, StatusTone>?—Maps status text to semantic tones.
onPressed:void Function(T row)?—Host action for this row.
hideHeaderLabel:boolfalseHides the visual heading while retaining its spoken label.
pinned:boolfalseKeeps this column fixed during horizontal scrolling.
sortable:boolfalseEnables the ascending, descending, host-order cycle.
compare:int Function(T a, T b)?—Optional comparison of host rows for local sorting.

PaymentEmptyMessage

class PaymentEmptyMessage · lib/src/content/empty_message.dart

Empty-state explanation and an optional next action.

ParameterTypeDefaultDescription
titlerequiredpositionalString—What is empty.
message:String?—Why it is empty.
actionLabel:String?—Next action label.
onAction:VoidCallback?—Host action, supplied together with its label.
icon:IconDataIcons.inbox_outlinedSupporting visual cue.