MagicTile constructor

const MagicTile({
  1. Key? key,
  2. Widget? title,
  3. Widget? subtitle,
  4. Widget? leading,
  5. Widget? trailing,
  6. String? thumbHash,
  7. VoidCallback? onPressed,
  8. String? titleText,
  9. String? subtitleText,
  10. IconData? leadingIcon,
  11. List<MenuItem> contextMenu = const [],
  12. bool fatPad = true,
  13. bool contextMenuEnabled = false,
  14. bool essentialLeading = false,
  15. bool essentialTrailing = true,
  16. double fatThreshold = 500,
  17. double leadingThreshold = 300,
  18. double trailingThreshold = 350,
})

Creates a MagicTile with responsive and menu options.

  • title/titleText, subtitle/subtitleText, leading/leadingIcon, trailing for content; onPressed for taps.
  • Responsiveness: fatThreshold, leadingThreshold, trailingThreshold control layout (defaults 500/300/350); essentialLeading/essentialTrailing force visibility; fatPad adds horizontal padding in fat mode.
  • Menu: contextMenu list of MenuItem, contextMenuEnabled toggles (default false); thumbHash for GlowCard blur.
  • Const constructor; uses BoxSignal for width-based adaptations without state.

Implementation

const MagicTile({
  super.key,
  this.title,
  this.subtitle,
  this.leading,
  this.trailing,
  this.thumbHash,
  this.onPressed,
  this.titleText,
  this.subtitleText,
  this.leadingIcon,
  this.contextMenu = const [],
  this.fatPad = true,
  this.contextMenuEnabled = false,
  this.essentialLeading = false,
  this.essentialTrailing = true,
  this.fatThreshold = 500,
  this.leadingThreshold = 300,
  this.trailingThreshold = 350,
});