FTile constructor

FTile({
  1. required Widget title,
  2. FTileStyle? style,
  3. bool? enabled,
  4. bool selected = false,
  5. String? semanticsLabel,
  6. bool autofocus = false,
  7. FocusNode? focusNode,
  8. ValueChanged<bool>? onFocusChange,
  9. ValueChanged<bool>? onHoverChange,
  10. ValueChanged<Set<WidgetState>>? onStateChange,
  11. VoidCallback? onPress,
  12. VoidCallback? onLongPress,
  13. Widget? prefixIcon,
  14. Widget? subtitle,
  15. Widget? details,
  16. Widget? suffixIcon,
  17. Key? key,
})

Creates a FTile.

Assuming LTR locale:

-----------------------------------------------------
| [prefixIcon] [title]       [details] [suffixIcon] |
|              [subtitle]                           |
----------------------------------------------------

The order is reversed for RTL locales.

Overflow behavior

If the tile's content overflows and details is text, details will be truncated first. Otherwise, title and subtitle will be truncated first.

Implementation

FTile({
  required Widget title,
  this.style,
  this.enabled,
  this.selected = false,
  this.semanticsLabel,
  this.autofocus = false,
  this.focusNode,
  this.onFocusChange,
  this.onHoverChange,
  this.onStateChange,
  VoidCallback? onPress,
  VoidCallback? onLongPress,
  Widget? prefixIcon,
  Widget? subtitle,
  Widget? details,
  Widget? suffixIcon,
  super.key,
}) : onPress = (enabled ?? true) ? onPress : null,
     onLongPress = (enabled ?? true) ? onLongPress : null,
     child = FTileContent(
       title: title,
       prefixIcon: prefixIcon,
       subtitle: subtitle,
       details: details,
       suffixIcon: suffixIcon,
     );