FTile constructor
FTile({
- required Widget title,
- FTileStyle? style,
- bool? enabled,
- bool selected = false,
- String? semanticsLabel,
- bool autofocus = false,
- FocusNode? focusNode,
- ValueChanged<
bool> ? onFocusChange, - ValueChanged<
bool> ? onHoverChange, - ValueChanged<
Set< ? onStateChange,WidgetState> > - VoidCallback? onPress,
- VoidCallback? onLongPress,
- Widget? prefixIcon,
- Widget? subtitle,
- Widget? details,
- Widget? suffixIcon,
- 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,
);