FTile constructor

FTile({
  1. required Widget title,
  2. FTileStyle? style,
  3. bool? enabled,
  4. String? semanticLabel,
  5. bool autofocus = false,
  6. FocusNode? focusNode,
  7. ValueChanged<bool>? onFocusChange,
  8. VoidCallback? onPress,
  9. VoidCallback? onLongPress,
  10. Widget? prefixIcon,
  11. Widget? subtitle,
  12. Widget? details,
  13. Widget? suffixIcon,
  14. 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, it'll be truncated first. Otherwise, title and subtitle will be truncated first.

Implementation

FTile({
  required Widget title,
  this.style,
  this.enabled,
  this.semanticLabel,
  this.autofocus = false,
  this.focusNode,
  this.onFocusChange,
  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,
      );