Skip to content
Get started
Menu
Get started

Loading skeleton

LoadingSkeleton stands in for a list while it loads: a few muted bars where the rows will be, with an optional square where each row’s icon goes.

Loading placeholders for payment text, rows and cards.Loading placeholders for payment text, rows and cards.
Light and dark variants
example/lib/screens/flow_screen.dart
LoadingSkeleton(rows: 3, leading: false);

Variants: list, text block, table.

rows sets how many placeholder rows are drawn (default 3). Match roughly how many rows usually appear, so the page does not jump much when the content arrives.

leading: false drops the square before each row, for content without icons.

const LoadingSkeleton(rows: 2, leading: false);

The skeleton is static on purpose. A shimmer repaints every frame for as long as the load takes and says nothing a still placeholder does not.

Situation Variant / composition Payment example
Transaction list loading list Use the shape that matches the pending content to preserve layout.

Use Spinner when the content shape is unknown.

Show the placeholder only while the host loads content. Replace it with the result or an error message when that request finishes.

Layout. A list skeleton row has the geometry of a two-line PaymentListItem: 12 dp padding, a 20 dp square on the first line and bars centred in the label and caption lines, so content does not move when it loads. The fill is the outline tone, visible in light and dark.

Do: Use the shape that matches the pending content to preserve layout.

Don’t: Show a blank jump instead of the known pending shape.

Match the expected content shape. Put request failures in a message with recovery guidance instead of leaving the placeholder visible.

  • Screen readers hear one “Loading” (or semanticLabel) instead of a series of empty boxes.
Example history screen with synthetic dataExample history screen with synthetic data
Example: history

LoadingSkeleton

class LoadingSkeleton extends StatelessWidget · lib/src/interaction/interaction.dart

Placeholder blocks shaped like the content that is loading.

Deliberately static: a shimmer repaints every frame for as long as the load takes and says nothing a still placeholder doesn't. Announced once as "Loading" instead of as empty boxes.

ParameterTypeDefaultDescription
rows:int3Number of placeholder rows.
leading:booltrueShows a small square before each row, where a row's icon would be.
semanticLabel:String?—Spoken loading description, defaulting to localized Loading.

LoadingSkeleton.table(…) — Table placeholders collapse to list rows on narrow surfaces.

ParameterTypeDefaultDescription
rows:int5Number of placeholder rows.
columns:int?3Table column count, or null for a list placeholder.
semanticLabel:String?—Spoken loading description, defaulting to localized Loading.
  • State message for what replaces the skeleton when there is nothing to show.
  • Spinner for a wait with no known shape.

Use Property list for grouped payment facts and Table for fee schedules.

LoadingSkeleton.table(rows: 3, columns: 3) matches table content and becomes list placeholders below 600 dp or at large text.