Button group
PaymentButtonGroup arranges related payment actions in a row or vertical stack. Use it for status actions, confirmations and module headers. Horizontal buttons hug their labels; the first action stays visible, and destructive actions occupy a separate final overflow group.



PaymentButtonGroup( direction: Axis.vertical, children: [ PaymentButton(label: 'Check status', onPressed: () {}), PaymentButton( label: 'Start new payment', variant: PaymentButtonVariant.secondary, onPressed: () {}, ), ], );In footers
Section titled “In footers”ViewFooter stacks its group vertically at full width below 600 dp and at large text, primary on top. In page headers, groups only appear on wide screens; phones show a title-row link or ⋮ instead.
Variants
Section titled “Variants”Variants: horizontal auto overflow, horizontal none, vertical.
Horizontal none
Section titled “Horizontal none”collapse: PaymentButtonGroupCollapse.none keeps one row of hug buttons while they fit. When they don’t, every button stacks at full width, with the emphasized action (primary or destructive, passed last) on top. A stacked group never leaves a ragged edge (D45, #65).
Horizontal auto overflow
Section titled “Horizontal auto overflow”The first action stays visible; trailing actions move into a ⋮ menu, and destructive actions always go there. On a phone that menu is a bottom action sheet.
States and content
Section titled “States and content”Choose horizontal overflow when supporting actions may move into a menu, no-collapse when all actions must remain visible, or vertical for a stacked group.
Which variant when
Section titled “Which variant when”| Situation | Variant / composition | Payment example |
|---|---|---|
| Report footer | vertical | Stack Send before Cancel on phones; use automatic menu overflow for detail header actions. |
Use a single Button when there is one action.
States
Section titled “States”Each button keeps its own disabled and busy state. Overflow changes where an action appears, not when it is available.
Do and don’t
Section titled “Do and don’t”Do: Stack Send before Cancel on phones; use automatic menu overflow for detail header actions.
Don’t: Place destructive and primary actions together in a vertical group.
Content guidelines
Section titled “Content guidelines”Use action labels such as “View receipt” and “Contact support”. Keep destructive actions separate from ordinary alternatives.
Accessibility
Section titled “Accessibility”Buttons keep their labels and keyboard behavior when moved into overflow. Long overflow labels wrap at large text.
In the example app
Section titled “In the example app”

PaymentButtonGroup
class PaymentButtonGroup extends StatefulWidget · lib/src/controls/button_group.dart
Related actions with at most one primary and separated destructive actions.
| Parameter | Type | Default | Description |
|---|---|---|---|
children:required | List<PaymentButton> | — | Actions in host reading order. |
direction: | Axis | Axis.horizontal | Vertical actions fill the available width. |
collapse: | PaymentButtonGroupCollapse | PaymentButtonGroupCollapse.auto | Horizontal overflow policy. |
menuTrigger: | Widget Function(VoidCallback toggle, FocusNode focusNode)? | — | Optional menu trigger receiving its toggle and focus node. |
PaymentButtonGroupCollapse
enum PaymentButtonGroupCollapse · lib/src/controls/button_group.dart
Responsive action overflow policy.
| Value | Description |
|---|---|
auto | Move trailing actions into a menu, retaining the first action. |
none | Stack an overflowing row at full width, with the emphasized action on top. |