ListTile constructor

ListTile({
  1. required Object title,
  2. Object? subtitle,
  3. Widget? leading,
  4. Widget? trailing,
  5. CmdCallback? onTap,
  6. bool enabled = true,
  7. bool selected = false,
  8. bool dense = false,
  9. EdgeInsets? padding,
  10. Color? background,
  11. Color? selectedBackground,
  12. Color? foreground,
  13. Color? selectedForeground,
  14. Style? titleStyle,
  15. Style? subtitleStyle,
  16. int gap = 1,
  17. int minLeadingWidth = 0,
  18. Key? key,
})

Creates a Material-style list tile.

title and subtitle accept either a Widget or plain text (String). Passing strings is a convenience; widgets provide full control.

Implementation

ListTile({
  required this.title,
  this.subtitle,
  this.leading,
  this.trailing,
  this.onTap,
  this.enabled = true,
  this.selected = false,
  this.dense = false,
  this.padding,
  this.background,
  this.selectedBackground,
  this.foreground,
  this.selectedForeground,
  this.titleStyle,
  this.subtitleStyle,
  this.gap = 1,
  this.minLeadingWidth = 0,
  super.key,
});