Skip to main content

Example

Basic card exampleBasic card example

Stats card for a dashboard.

Properties

Required

Widget
required
The content to display inside the card.

Layout

EdgeInsetsGeometry?
default:"theme.spacings.large"
Custom padding inside the card.

Best Practices

  • Group related content: Use cards to visually group related information and create clear content boundaries
  • Use consistent padding: Stick with default padding or use theme spacing values for consistency
  • Consider content hierarchy: Use appropriate text styles and spacing within cards
  • Avoid nesting cards: Generally avoid placing cards inside other cards to prevent visual complexity

Integration Notes

  • Flexible content: Works with any widget as child content
Last modified on January 21, 2026