flutter_ui_payment library
Compatibility entry point within Rakit UI.
Prefer importing package:rakit_ui/rakit_ui.dart. This forwards the same
declarations; it does not redirect the separately published old package.
Classes
- ActionTile
- Deprecated wrapper: subtitle is secondaryTitle and onTap is onPressed.
- App shell that shows NavSidebar permanently when the window is at least breakpoint wide, and in a modal drawer behind a menu button when it is narrower.
- AmountParseResult
- Outcome of parsing and validating an amount. Exactly one of money or issue is set.
- AmountText
- Renders Money with the active locale's formatter and a spoken label.
- AuthorizationPrompt
- Shows the state of the host's authorization challenge.
- BalanceCard
- Wallet balance, whether it covers the payment, and limit usage.
- CaptureFrameOverlay
- Passive framing over a host preview. Never responds to image content.
- ChartModule
- A chart section with stable loading, empty and error states.
- ChartPoint
- One period reading, with missing values distinct from zero.
- CountdownText
- Counts down to expiresAt using the host clock. Stops at zero and calls onElapsed once; reaching zero is not proof of non-payment.
- CurrencySpec
- Currency metadata used for formatting and parsing.
- DataRequirement
- One item of data the host asks for, with the reason shown before consent.
- DocumentFile
- Metadata of a file the host selected. Bytes stay with the host.
- DocumentIssue
- DocumentRequirement
- Host-defined limits for one document slot.
- DocumentSlotState
- Rendered state of one document slot. requestId lets the host ignore results from uploads that a newer selection replaced.
- DocumentUploadTile
- One document slot: limits, picking, upload progress and recoverable errors.
- HostError
- IdentityFieldSpec
- A host-defined identity field. Validation rules belong to the host; the form only runs them and shows their messages.
- IdentityForm
- Identity form driven by host IdentityFieldSpecs.
- IdentityFormController
- Submits an IdentityForm from outside it, so a host can pin the submit in a footer, e.g. PaymentOnboardingView.primaryAction (D62).
- InfoRow
- A label/value row. At large text scales the value moves under the label only when the two do not fit on one line, so long labels and big amounts never overflow and short rows stay one line.
- KycCaptureGuide
- Framing, host photo review and upload state. Host owns all verdicts. With bounded height, actions pin below a scroll region and the preview fits above the footer in a centred 640 dp column (D62, D53). Inside a host scroll view, the preview and actions remain inline.
- LoadingSkeleton
- Placeholder blocks shaped like the content that is loading.
- MerchantHeader
- Who is being paid and for which order.
- MeterSegment
- One non-negative category in a meter.
- MiddleEllipsisText
-
Single-line text that, when too long, keeps both ends and elides the
middle:
ktp_demo_ret…ake.png. Use it for file names, references and IDs whose start and extension both matter. Screen readers get the full text. - Money
- An amount of money as an integer number of minor units.
- MoneyFormat
- Locale-aware formatting and strict parsing of Money.
- Vertical navigation list. Used as the permanent sidebar on wide screens and as the content of the modal drawer on narrow ones.
- PaymentAccordion
- A ruled list of disclosure items; items own their hairlines.
- PaymentAccordionItem
- A titled section whose body can be shown or hidden.
- PaymentActionBar
- Pinned bottom bar with the total and the step's main action, so both stay reachable however long the page is.
- PaymentAsyncConfirmLabels
- Action labels for an open showPaymentAsyncConfirmDialog.
- PaymentAttempt
- Local record of one payment attempt.
- PaymentBadge
- Small tag showing a status with icon and text; color only supports the label.
- PaymentBanner
- Inline message for errors, warnings and explanations.
- PaymentBarChart
- Non-negative grouped readings across periods.
- PaymentBox
- Token-only layout container. Never merges child semantics.
- PaymentBreadcrumb
- Ancestor navigation delegated to the host.
- PaymentButton
- Button with consistent idle/busy/disabled feedback.
- PaymentButtonGroup
- Related actions with at most one primary and separated destructive actions.
- PaymentButtonStyle
- Partial button appearance, resolved after semantic and family defaults.
- PaymentButtonTheme
-
Button-family overrides registered in
ThemeData.extensions. - PaymentChartSeries
- Named points sharing the same periods with the other series.
- PaymentCheckbox
- A checkbox with its label, for consent and opt-in choices.
- PaymentChip
- Compact value or filter; callbacks select removable, edit or suggested kind.
- PaymentChipList
- Related chips with arrow-key focus traversal.
- PaymentCode
- Monospace, tabular text people read or copy.
- PaymentCollection
- A bounded, lazy viewport for records with host-defined rows and states.
- PaymentConfirmation
- Final review before the host authorizes and submits.
- PaymentConfirmClose
- Copy for protecting unsaved work on close.
- PaymentContextView
- A contextual panel beside host content.
- PaymentCopyButton
- Host-owned copying with a temporary check and persistent inline failure.
- PaymentCurrencyField
- Free-form amount entry with strict, locale-aware parsing.
-
PaymentDataColumn<
T> - One host-owned data column.
- PaymentDataSort
- Current column sort; null restores host order.
-
PaymentDataTable<
T> - Responsive host data with page-scoped selection and local sort/filter.
- PaymentDateField
- Typed calendar date with a kit date sheet. Host owns range rules.
- PaymentDatePreset
- A host-named complete calendar range.
- PaymentDateRange
- A complete range in the host zone, optionally from a preset.
- PaymentDateRangePicker
- Preset sheet or the kit range calendar (D51); performs no zone conversion.
- PaymentDetailPage
- Detail body owning one scroll region; do not nest in FullPageView.
- PaymentDetailPagePropertyList
- Property module with loading, empty and retry states.
-
PaymentDetailPageTable<
T> - A table module with host row actions and no selection or pagination.
- PaymentDetailProperty
- A labeled set of related values.
- PaymentDetailValue
- One displayed detail value with optional secondary copy.
- PaymentDivider
- A 1 px hairline in PaymentTheme.outline that separates rows or groups. Decorative: screen readers skip it.
- PaymentEmptyMessage
- Empty-state explanation and an optional next action.
- PaymentFieldTheme
-
Field-family appearance registered in
ThemeData.extensions(D102). - PaymentFocusView
- A focused task body; only its presentation function opens a sheet.
- PaymentFormFieldGroup
-
Related fields under a legend. A horizontal group stacks when its fields
would be narrower than 140 dp each, or at large text. Hosts put 24 dp
(
PaymentSpace.section) between groups; fields inside sit 16 apart. The legend sits 16 dp (group) above the first control's visible top: a field's edge, or a checkbox, radio or switch row's label (#66). A row's 48 dp target reaches into that gap but never onto the legend. - PaymentFullPageView
- Full-page body; the host supplies its scaffold and navigation.
- PaymentIcon
- Material glyph at a semantic size, centered on the first text line.
- PaymentIconButton
- A 48 dp action with a spoken tooltip, circular focus ring and press feedback.
- PaymentIcons
- Fixed meanings for the kit icon vocabulary.
- PaymentImage
- A host-supplied image with alt text, loading and error states.
- PaymentInline
- Text in one type role.
- PaymentInstructions
- Manual transfer instructions (for example a virtual account).
- PaymentLineChart
- Trends across periods, with gaps for missing readings.
- PaymentLink
- Inline text action; the host opens any destination.
- PaymentList
- A list of PaymentListItems (or other rows) separated by hairlines. There is no box around the group: it sits on the page surface like a section.
- PaymentListItem
- A payment list row with a host action, icon or image.
- PaymentLocalizations
- Overridable strings and formatters for every kit component.
- PaymentMenu
- Overflow menu behind an icon button.
- PaymentMenuEntry
- One entry of a PaymentMenu.
- PaymentMenuGroup
- A titled run of menu actions, separated from neighboring groups.
- PaymentMenuItem
- PaymentMeterChart
- A categorical breakdown with optional host actions on legend rows.
- PaymentMethod
- PaymentMethodPicker
- Single-choice list of host-supplied methods.
- PaymentMotion
- Motion tokens shared by the kit.
- One destination in a NavSidebar or AdaptiveNavShell.
- A titled group of PaymentNavItems.
- PaymentOnboardingView
- Host-guided setup with current content before the task list on phones.
- PaymentOverviewPage
- Non-scrolling page modules; place inside a FullPageView.
- PaymentPageModule
- A flat, ruled section of a page.
- PaymentPagination
- Page delivery strategy. Pages start at one.
- PaymentPropertyList
- Label/value pairs, stacked or arranged horizontally when space permits.
- PaymentPropertyListItem
- A fact with exactly one text or widget value.
- PaymentQuote
- A priced snapshot from the host. The UI renders total as given and never recomputes it; consistency is the host's responsibility.
-
PaymentRadio<
T> - One option of a single choice. Give every option in the group the same groupValue and onChanged; the option whose value equals groupValue is selected.
- PaymentReceipt
- Receipt for a payment the host confirmed as succeeded.
- PaymentReceiptData
- Receipt detail for a payment the host has confirmed as succeeded.
- PaymentRecordCard
- 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.
- PaymentRecordCardStyle
- Optional appearance overrides for a PaymentRecordCard.
-
PaymentRowAction<
T> - An action on a host row.
-
PaymentRowActionEntry<
T> - Closed family of row actions.
-
PaymentRowActionGroup<
T> - A named action group.
-
PaymentSearchField<
T> - Locally filtered or host-searched listbox with keyboard selection (D50).
-
PaymentSearchOption<
T> - One host value and its visible search label.
- PaymentSection
- A titled group of content. Sections are flat: they sit on the page surface and are separated by space, never boxed, so they nest inside a host's own cards and sheets without stacking borders.
-
PaymentSelect<
T> - Field trigger with a radio sheet, or draft checkboxes and Apply.
-
PaymentSelectOption<
T> - One option; a disabled reason explains unavailable choices.
- PaymentSettingsView
- Grouped host settings with a future-locked Save action.
- PaymentSheet
- Layout for bottom sheets and side panels: a fixed header, a body that scrolls when it is taller than the space, and a fixed footer for actions. Respects the safe area and moves above the software keyboard.
- PaymentSheetHeader
- Title row for a PaymentSheet with an optional close button.
- PaymentSignInLearnMore
- Supplemental explanation presented separately in a focus view.
- PaymentSignInView
- External sign-in entry point with no credential input or free content slot.
- PaymentSpan
- One styled run in rich inline text.
- PaymentSparkline
- Compact trend with optional pointer inspection.
- PaymentSpinner
- Indeterminate progress for a wait with no known length: a thin ring, or a still hourglass when the platform or host asks for reduced motion.
- PaymentStatusSnapshot
- An authoritative status snapshot produced by the host adapter.
- PaymentStatusView
- Renders an attempt from host-authoritative data.
- PaymentStepIndicator
- Where the customer is in a multi-step flow.
- PaymentSummary
- Items, every fee and the host total. Fees are never collapsed.
- PaymentSwitch
- An on/off setting that takes effect at once, such as "Notify me about refunds". For a choice that is only applied after a button press, use a PaymentCheckbox instead.
- PaymentTab
- A tab label and optional unavailability reason.
- PaymentTable
- A static table that becomes labeled list rows on phones and at large text.
- PaymentTableCell
- A table value.
- PaymentTableHeaderCell
- A labeled column.
- PaymentTableRow
- A row with one cell per heading.
- PaymentTabPanels
- Lazily builds selected panels and preserves visited state. Hidden panels are offstage, excluded from focus and semantics, and have paused tickers.
- PaymentTabs
- Controlled tabs. Arrows move focus, skipping disabled tabs; Enter or Space selects. Sizes change typography and padding, never the 48 dp target.
- PaymentTaskList
- Sequential setup tasks with distinct status marks.
- PaymentTaskListItem
- One task and its host-defined status.
- PaymentTextArea
- Several lines of free text. Enter inserts a newline; modified Enter submits.
- PaymentTextField
- Labeled single-line input integrated with Form validation.
- PaymentTheme
- Brand tokens for every rakit_ui widget.
- PaymentToastController
- Controls one toast from showPaymentToast.
- PaymentTooltip
- A one-line, noninteractive hint (D49). It opens on tap, hover, long press or keyboard focus; a second tap, an outside tap, Escape, blur and exit close it. Screen readers get message through the trigger's semantics. Requires an Overlay.
- PaymentType
- Public type foundation: nine closed roles, seven sizes and two weights. Every role inherits the host font. Choose a role for hierarchy; there is no weight modifier. Use tabular for numbers and reference for IDs.
- PaymentVideoController
- Bridge between PaymentVideoPlayer and the host's media engine.
- PaymentVideoPlayer
- Video with accessible controls below the picture.
- PrivacyMask
- Covers sensitive content when obscured is true, for example while the host app is in the app switcher. OS-level screenshot protection remains the host's responsibility.
- PromoCard
- A clearly labeled promotion with a call to action and optional dismiss.
- PromoCodeInput
- Promo code entry. The host validates the code and, if accepted, returns a new quote with a discount line; this widget only collects the code and shows the host's verdict. It never computes a discount.
- PromoContent
- Host-supplied promotion. The kit renders it and reports taps; it never fetches campaigns, tracks impressions or applies discounts itself.
- PromoSlot
- A placement that can be loading, filled, empty or failed.
- QuoteLine
- The only fields that leave the app when a receipt is shared.
- ReconcileResult
- RefundInfo
- RefundSection
- Refund lifecycle shown beside, never instead of, the original payment.
- StateMessage
-
Empty, error and "nothing matches" states: what happened, one line on
why, and at most one way forward. Compact and left-aligned, so it reads
as part of the list it replaces rather than as an illustration.
Padded by
group(16) above and below. - StatusBand
- Thin band above a status title. A solid band marks a settled or waiting state; a hatched band marks an outcome that is not known yet, so the two warning states differ in shape as well as in words, not only in color.
- StatusHeader
- The top of a status screen: a band, then an icon beside the state in words. Band shape, tone, icon and words are four signals, so a hatched band (the outcome is not known yet) never reads as a plain "pending".
- ToneColors
- Foreground/container pair for one StatusTone.
- TransactionDetail
- Details of one transaction. The original payment and any refund are shown as separate sections; host actions go in actions.
- TransactionHistory
- Search, filters and a list of transactions with loading, empty, "no matches" and error states.
- TransactionListItem
- A row in a transaction list: what, when, how much and its status.
- TransactionRecord
- One past or ongoing payment as the host's history API reports it.
- VerificationIntro
- Explains what data the host requests and why, then asks for consent.
- VerificationReview
- Read-only review before submitting verification.
- VerificationSnapshot
- Status snapshot. Holds no document bytes and no full identity data.
- VerificationStatusView
- Explains a verification state and offers only host-allowed actions. There is never a bypass action.
- VideoPlaybackValue
- A snapshot of playback that a PaymentVideoController publishes.
- VirtualAccountInstructions
Enums
- AmountIssue
- AmountTextVariant
- The five amount looks. Nothing else exists.
- AuthorizationPhase
- Progress of the host-owned authorization challenge (PIN, OTP, biometrics). The library never receives the secret itself.
- BalanceState
- Balance state as decided by the host for the current quote.
- CaptureKind
- Framing guidance only. No image analysis is performed.
- CaptureSource
- The host opens the chosen source and requests permission after selection.
- ChartPointStatus
- Settlement state of a reading.
- ChartState
- Host-owned chart loading state.
- DocumentIssueKind
- DocumentSlotPhase
- HostErrorCategory
- Structured error categories a host adapter maps provider failures into.
- IdentityFieldKind
- What an identity field collects. Nothing else exists.
- Observation
- Freshness of the last observed status.
- PaymentAction
- Actions the host currently allows for an attempt.
- PaymentAlign
- Axis alignment.
- PaymentBoxBackground
- Semantic surface.
- PaymentButtonGroupCollapse
- Responsive action overflow policy.
- PaymentButtonVariant
- How much weight a PaymentButton carries. Use one primary per screen.
- PaymentCellType
- Supported host value presentations.
- PaymentChartAxis
- Axes to label or grid.
- PaymentChartUnit
- How a chart reads its values.
- PaymentCodeKind
- Code presentation. Nothing else exists.
- PaymentDateGranularity
- Calendar grouping. Nothing else exists.
- PaymentDistribute
- Sibling distribution.
- PaymentFieldPart
- A hidden field part stays in semantics; consumers arrive in later phases.
- PaymentFocusViewSize
- Focus task size on phone and wide panels.
- PaymentFontWeight
- Running-text emphasis only; choose a PaymentType role for hierarchy.
- PaymentIconButtonVariant
- Semantic icon colors. Nothing else exists.
- PaymentIconSize
- Existing icon sizes; medium scales with text up to 1.6×.
- PaymentKeyline
- Semantic one-pixel edge.
- PaymentLinkVariant
- Inline text hierarchy. Nothing else exists.
- PaymentListItemSize
- A tappable row for settings, menus and action lists.
- PaymentMethodKind
- PaymentRadius
- Corner roles for PaymentBox and PaymentImage.
- PaymentRecordCardDivider
- Placement of the divider above a PaymentRecordCard footer.
- PaymentSize
- Visual size only; layout box and hit area stay at least 48×48 dp. Components document their heights.
- PaymentSpace
- Spacing roles resolved by PaymentTheme.space; nothing else exists.
- PaymentStack
- Layout direction.
- PaymentStatus
- Business status reported by the host after the server knows the payment.
- PaymentTaskStatus
- Host-owned task progress.
- PaymentTextColor
- Semantic text and icon colors.
- PaymentTextFieldType
- Input traits; sensitive input belongs to the host.
- PaymentTextRole
- The nine PaymentType roles; no additional role exists.
- PaymentTooltipPlacement
- Twelve placements; start and end follow the text direction.
- PaymentTooltipType
- Whether the message names the trigger or adds detail.
- PaymentWidth
- Width policy; labels wrap and never truncate.
- PromoCodeStatus
- Host verdict on a promo code.
- PromoKind
- Whether content is paid placement or the host's own offer. Both are always labeled; a sponsored item also names who paid for it.
- PromoLayout
- PromoSlotState
- Where a promotion slot is while the host loads it.
- QuoteLineKind
- ReconcileRejection
- RefundStatus
- Refund lifecycle, tracked separately so a refund never rewrites the original payment result.
- Result reported by the host's share or clipboard implementation.
- StatusTone
- Semantic tone of a status. Widgets always pair a tone with an icon and a text label, so color is never the only signal.
- SubmissionState
- What the client knows about its own submission, independent of the business status.
- TransactionFilter
- Groups used by transaction filters. The matching rules live with the records.
- VerificationAction
- Next steps the host allows for the current verification state.
- VerificationStatus
- Business status of identity verification, decided only by the host.
- VideoPhase
- Where a video is in its lifecycle.
Functions
-
checkDocumentLimits(
DocumentRequirement requirement, DocumentFile file) → DocumentIssue? - Checks a file against host limits before upload. Passing this check does not mean the document is genuine.
-
showCaptureSourceSheet(
{required BuildContext context, Set< CaptureSource> sources = const {CaptureSource.camera, CaptureSource.gallery, CaptureSource.file}, String? title, VoidCallback? onOpenSettings}) → Future<CaptureSource?> - Reports intent only. Host checks permission after source selection. Rows always appear camera, gallery, file. Skip this sheet for one source.
-
showPaymentAsyncConfirmDialog(
BuildContext context, {required String title, required Widget description, required String confirmLabel, required Future< bool> onConfirm(), String? cancelLabel, String? pendingLabel, ValueListenable<PaymentAsyncConfirmLabels> ? actionLabels, bool destructive = false}) → Future<bool> -
Presents confirmation with the same responsive layout and initial focus as
showPaymentConfirmDialog, but keeps it open while the host runs
onConfirm. -
showPaymentConfirmDialog(
BuildContext context, {required String title, required String message, required String confirmLabel, String? cancelLabel, bool destructive = false}) → Future< bool> - Asks before an action that cannot be undone. Resolves to true only when the person confirms; the scrim, swipe down, Back and Escape all resolve to false.
-
showPaymentFocusView<
T> (BuildContext context, {required WidgetBuilder builder, PaymentFocusViewSize size = PaymentFocusViewSize.small}) → Future< T?> - Presents a focused task through the existing sheet surfaces: a bottom sheet on phones (window shortest side under 600 dp, so also in landscape; D92) and a side sheet on tablets.
-
showPaymentSheet<
T> ({required BuildContext context, required WidgetBuilder builder, bool isDismissible = true}) → Future< T?> - Opens a modal bottom sheet sized to its content, up to the full height. Use PaymentSheet.height to request a shorter panel.
-
showPaymentSideSheet<
T> ({required BuildContext context, required WidgetBuilder builder, bool barrierDismissible = true, double maxWidth = 420}) → Future< T?> - Opens a panel from the end edge (right in left-to-right languages), for filters or details on wide screens. The scrim, Back and Escape close it; focus returns to whatever opened it.
-
showPaymentSnackBar(
BuildContext context, {required String message, StatusTone tone = StatusTone.neutral, String? actionLabel, VoidCallback? onAction}) → ScaffoldFeatureController< SnackBar, SnackBarClosedReason> - Deprecated wrapper of showPaymentToast returning the Material controller.
-
showPaymentToast(
BuildContext context, {required String message, StatusTone tone = StatusTone.neutral, bool pending = false, String? actionLabel, VoidCallback? onAction}) → PaymentToastController -
Short feedback after an action. Failures requiring a fix use PaymentBanner.
Neutral, success, warning, or pending. Reading time is 4–10 seconds,
at least 6 with an action; pending and accessible actions never time out.
The newest toast wins: showing one replaces the kit toast on screen and
drops any kit toast still waiting (D77). When reduced motion changes, the
whole snack bar queue is cleared first, host snack bars included (D78).
The toast takes its look from the themes around
context: themes scoped below the ScaffoldMessenger are captured once when it shows, and app themes above the messenger stay live only where no captured theme shadows them; a captured Material Theme freezes its full ThemeData (D103).
Typedefs
- ActionMenu = PaymentMenu
- Deprecated alias of PaymentMenu.
- ActionMenuEntry = PaymentMenuItem
- Deprecated alias of PaymentMenuItem.
- ActionTileGroup = PaymentList
- Deprecated alias of PaymentList.
- AmountInput = PaymentCurrencyField
- Deprecated alias of PaymentCurrencyField.
- ExpandableSection = PaymentAccordionItem
- Deprecated alias of PaymentAccordionItem.
- NoticeBanner = PaymentBanner
- Deprecated alias of PaymentBanner.
- StatusBadge = PaymentBadge
- Deprecated alias of PaymentBadge.