Skip to content
Get started
Menu
Get started

Divider

PaymentDivider draws the kit’s hairline: 1 px in PaymentTheme.outline. It is decorative.

Horizontal dividers separating content with default and section spacing.Horizontal dividers separating content with default and section spacing.
Divider
example/lib/screens/gallery_layout.dart
PaymentDivider(height: theme.space(PaymentSpace.section));

Use height for the space around the rule. The rule stays 1 dp thick and uses PaymentTheme.outline.

Variants: horizontal, vertical.

The default height of 1 puts the rule directly between two rows, with no extra space. It is the same rule PaymentList draws between action rows.

Set height to spacing * 3 (24 with the default theme). The rule then sits in the middle of a section gap.

PaymentDivider(height: PaymentTheme.of(context).spacing * 3);

Every horizontal rule in kit patterns uses PaymentDivider, including action groups, checkout, receipts, history and video controls. Side-by-side navigation keeps its vertical rule. Thickness is always 1 dp, including Material 2 hosts and hosts with a custom divider thickness.

Situation Variant / composition Payment example
Separate receipt sections horizontal Use the theme outline and spacing from the surrounding composition.

Use Section for a titled content group.

The divider is decorative and has no loading, error or interaction state.

Do: Use the theme outline and spacing from the surrounding composition.

Don’t: Draw custom raw-color lines beside kit rules.

  • Prefer space to separate sections. Add a rule only where space alone does not read as a break, such as before a total.
  • Do not use a divider as a border around content. Sections are flat by design.

The divider is excluded from semantics. Use headings or labels to communicate the grouping it supports.

PaymentDivider

class PaymentDivider extends StatelessWidget · lib/src/foundation/primitives.dart

A 1 px hairline in PaymentTheme.outline that separates rows or groups. Decorative: screen readers skip it.

Between rows of a list use the default height of 1, as PaymentList does. Between sections use the section gap (24) so the rule sits in the middle of a section gap.

ParameterTypeDefaultDescription
height:double1Total height, with the rule centered in it.