Action bar
Pin the payable total beside one primary Pay action. The host computes the amount and controls quote updates; the bar never decides eligibility.



// The summary already shows the total, so the bar holds only the action.// maxContentWidth is the list's own cap: 1040 beside the order context.PaymentActionBar( maxContentWidth: maxContentWidth, action: PaymentButton( label: s.reviewAndPay, busy: c.quoting, busyLabel: PaymentLocalizations.of(context).updatingTotal, onPressed: quote != null && c.selectedMethod != null && !c.quoting ? c.reviewOrder : null, ), );Variants
Section titled “Variants”Variants: ready, updating, disabled action.
Which variant when
Section titled “Which variant when”| Situation | Variant / composition | Payment example |
|---|---|---|
| Pinned payable total | ready | Use one primary Pay action; updating means the host is recomputing the quote. |
| Total already on screen (checkout summary) | action only, no total |
The example’s checkout: “Review payment”, busy with “Updating total…” during a re-quote, so the total isn’t shown three times and the bar stays compact at 200% (D62, #64). Full width on phones; from 600 dp of available footer width (about 632 dp of window with the default gutters) it hugs at the end edge (#79). With the order context beside the form the example passes maxContentWidth: 1040, so the action ends where the content does (#84). |
Use Button group for secondary page actions. Later payment-path screens (confirm, authorize, status, KYC) pin their own action when given a bounded height, so they don’t need this bar.
States
Section titled “States”Ready shows the host total and action. Updating keeps the total region stable while the quote changes. A disabled action needs a visible explanation in the checkout content.
Layout. The total stays laid out under the “Updating total” caption, so the bar keeps one height while the total refreshes, at every text scale.
Width. From 600 dp the bar’s content sits in a centred column: 640 dp by default, or maxContentWidth. Pass the cap of the content above the bar, such as 1040 for a two-column page, so the bar’s column and its action’s end edge line up with the content’s (#84). An action alone follows the footer rule of views and the payment path: full width below 600 dp of available footer width and at large text, a hug button at the end edge wider. The width is measured inside the bar’s padding, so with the default 16 dp gutters and no side insets hugging starts at a bar 632 dp wide. With a total, the total takes the start side and the action hugs at the end.
Safe area. The bar sits in Scaffold.bottomNavigationBar, beside the body, so it pads the safe-area insets itself. On a phone in landscape it adds the side insets to its 16 dp gutters; wrap the body in a SafeArea with 16 dp padding and the bar’s content edges match the body’s on both sides, in both text directions (#88). The bottom takes the larger of the inset and 12 dp.
Do and don’t
Section titled “Do and don’t”Do: Use one primary Pay action; updating means the host is recomputing the quote.
Don’t: Add another primary Pay in supporting order context.
Content guidelines
Section titled “Content guidelines”Name the next step in the button label. If the total is already prominent in the checkout summary, omit the bar’s total.
Accessibility
Section titled “Accessibility”Keep the total before the action in reading order. Button labels wrap, and targets stay at least 48 dp.
PaymentActionBar
class PaymentActionBar extends StatelessWidget · lib/src/payment/payment_extras.dart
Pinned bottom bar with the total and the step's main action, so both stay reachable however long the page is.
Place it in Scaffold.bottomNavigationBar. While updating the total says so and the host should pass a disabled action.
| Parameter | Type | Default | Description |
|---|---|---|---|
action:required | Widget | — | Main action; pass width: PaymentWidth.hug on PaymentButton. With no total the action fills the bar on phones and at large text, so pass a full-width button. From 600 dp of available footer width (632 dp of bar without side insets, with the default gutters) it hugs at the end edge of the maxContentWidth column, like other pinned footers (D59, D62). Side safe-area insets add to the 16 dp gutters, so the bar's content edges match a body in a SafeArea with the same gutters. |
total: | Money? | — | — |
totalLabel: | String? | — | — |
updating: | bool | false | — |
maxContentWidth: | double | 640 | Widest column for the bar's content, centred like the page's: the 640 dp D53 column by default. Pass the cap of the content above the bar, e.g. 1040 when it shows two columns, so the action's end edge lines up with the content's (#84). |