Skip to main content
Pass mock data as the child while isLoading is true. The skeleton draws bones from what that child paints, so an empty child has no bones. When the content loads again, pass the previous data as the mock so the shape stays the same.

Examples

Properties

Required

Widget
required
The content. While isLoading is true, pass mock data here. The skeleton draws bones from what this child paints, so an empty child has no bones.

State

bool
default:"false"
Whether to show the skeleton. Set it to false to reveal the content.

Constructors

NeoSkeleton.keep and NeoSkeleton.bone mark a part inside a NeoSkeleton. Outside a skeleton they show their child as it is.

NeoSkeleton.keep()

Shows a part as it is while the skeleton loads. A kept part stays live, so it takes taps and a screen reader can reach it.
Widget
required
The part to keep.

NeoSkeleton.bone()

Turns a part into one bone in its own shape, such as an avatar with initials.
Widget
required
The part to turn into one bone.

What Becomes a Bone

  • Each line of text becomes a bar.
  • Icons and images become rounded blocks.
  • Shapes with nothing inside, such as a filled circle, become bones in their own shape.
  • A surface with content inside, such as a NeoCard, keeps its look.
  • NeoButton, NeoDivider, and NeoTabBar stay as they are.
  • NeoBadge, NeoToggleSwitch, NeoCheckbox, and NeoFluidCounter each become one bone.
  • NeoSkeleton.keep and NeoSkeleton.bone take precedence over these defaults.

Best Practices

  • Pass mock data while loading. An empty child draws no bones.
  • When the content loads again, pass the previous data as the mock so the shape stays the same.
  • Put the skeleton in an AnimatedSize when the loaded content can have a different size.

Behavior

  • While loading, the bones shimmer. With reduced motion, they stay still and the content appears without a sweep.
  • When loading ends, the content arrives behind a sweep from the top-left. Skeletons that finish in the same frame share one sweep.
  • The skeleton always takes the size of its child, so content of a different size changes the box at once.
  • While loading, only kept parts take taps. A screen reader hears “Loading” once, plus the kept parts.
  • The skeleton records its child again when the child widget changes, when the theme changes, and on hot reload. An animation inside it is recorded again at most every 250 ms.
Last modified on November 18, 2026