tile static method

FTile tile({
  1. required Widget title,
  2. FItemVariant variant = .primary,
  3. FItemStyleDelta style = const .context(),
  4. bool? enabled,
  5. bool selected = false,
  6. String? semanticsLabel,
  7. bool autofocus = false,
  8. FocusNode? focusNode,
  9. ValueChanged<bool>? onFocusChange,
  10. ValueChanged<bool>? onHoverChange,
  11. FTappableVariantChangeCallback? onVariantChange,
  12. VoidCallback? onPress,
  13. VoidCallback? onLongPress,
  14. VoidCallback? onDoubleTap,
  15. VoidCallback? onSecondaryPress,
  16. VoidCallback? onSecondaryLongPress,
  17. Map<ShortcutActivator, Intent>? shortcuts,
  18. Map<Type, Action<Intent>>? actions,
  19. Widget? prefix,
  20. Widget? subtitle,
  21. Widget? details,
  22. Widget? suffix,
  23. Key? key,
})

Creates a FTile.

Assuming LTR locale:

-----------------------------------------------------
| [prefix] [title]       [details] [suffix]         |
|          [subtitle]                               |
-----------------------------------------------------

The order is reversed for RTL locales.

Overflow behavior

FTile has custom layout behavior to handle overflow of its content. If details is text, it is truncated, else title and subtitle are truncated.

Why isn't my title subtitle, or details rendered?

Using widgets that try to fill the available space, such as Expanded or FTextField, will cause the title/ subtitle/details to never be rendered.

Use FTile.raw in these cases.

This function is a shorthand for FTile.new.

Implementation

static FTile tile({
  required Widget title,
  FItemVariant variant = .primary,
  FItemStyleDelta style = const .context(),
  bool? enabled,
  bool selected = false,
  String? semanticsLabel,
  bool autofocus = false,
  FocusNode? focusNode,
  ValueChanged<bool>? onFocusChange,
  ValueChanged<bool>? onHoverChange,
  FTappableVariantChangeCallback? onVariantChange,
  VoidCallback? onPress,
  VoidCallback? onLongPress,
  VoidCallback? onDoubleTap,
  VoidCallback? onSecondaryPress,
  VoidCallback? onSecondaryLongPress,
  Map<ShortcutActivator, Intent>? shortcuts,
  Map<Type, Action<Intent>>? actions,
  Widget? prefix,
  Widget? subtitle,
  Widget? details,
  Widget? suffix,
  Key? key,
}) => .new(
  title: title,
  variant: variant,
  style: style,
  enabled: enabled,
  selected: selected,
  semanticsLabel: semanticsLabel,
  autofocus: autofocus,
  focusNode: focusNode,
  onFocusChange: onFocusChange,
  onHoverChange: onHoverChange,
  onVariantChange: onVariantChange,
  onPress: onPress,
  onLongPress: onLongPress,
  onDoubleTap: onDoubleTap,
  onSecondaryPress: onSecondaryPress,
  onSecondaryLongPress: onSecondaryLongPress,
  shortcuts: shortcuts,
  actions: actions,
  prefix: prefix,
  subtitle: subtitle,
  details: details,
  suffix: suffix,
  key: key,
);