FTappable.static constructor

const FTappable.static({
  1. FTappableStyleDelta style = const .context(),
  2. FFocusedOutlineStyleDelta? focusedOutlineStyle,
  3. String? semanticsLabel,
  4. String? semanticsHint,
  5. String? semanticsTooltip,
  6. bool semanticsContainer = true,
  7. bool semanticsButton = true,
  8. bool? semanticsChecked,
  9. bool? semanticsExpanded,
  10. bool? semanticsInMutuallyExclusiveGroup,
  11. SemanticsRole? semanticsRole,
  12. bool excludeSemantics = false,
  13. bool autofocus = false,
  14. bool hoverFocus = false,
  15. FocusNode? focusNode,
  16. ValueChanged<bool>? onFocusChange,
  17. ValueChanged<bool>? onHoverChange,
  18. FTappableVariantChangeCallback? onVariantChange,
  19. bool selected = false,
  20. bool selectable = false,
  21. HitTestBehavior behavior = .translucent,
  22. GestureTapDownCallback? onPressDown,
  23. GestureTapCancelCallback? onPressCancel,
  24. GestureTapMoveCallback? onPressMove,
  25. GestureTapUpCallback? onPressUp,
  26. VoidCallback? onPress,
  27. VoidCallback? onDisabledPress,
  28. GestureLongPressDownCallback? onLongPressDown,
  29. GestureLongPressCancelCallback? onLongPressCancel,
  30. GestureLongPressStartCallback? onLongPressStart,
  31. GestureLongPressMoveUpdateCallback? onLongPressMove,
  32. GestureLongPressEndCallback? onLongPressEnd,
  33. VoidCallback? onLongPress,
  34. GestureTapDownCallback? onDoubleTapDown,
  35. GestureTapCancelCallback? onDoubleTapCancel,
  36. VoidCallback? onDoubleTap,
  37. GestureTapDownCallback? onSecondaryPressDown,
  38. GestureTapCancelCallback? onSecondaryPressCancel,
  39. GestureTapUpCallback? onSecondaryPressUp,
  40. VoidCallback? onSecondaryPress,
  41. GestureLongPressDownCallback? onSecondaryLongPressDown,
  42. GestureLongPressCancelCallback? onSecondaryLongPressCancel,
  43. GestureLongPressStartCallback? onSecondaryLongPressStart,
  44. GestureLongPressMoveUpdateCallback? onSecondaryLongPressMove,
  45. GestureLongPressEndCallback? onSecondaryLongPressEnd,
  46. VoidCallback? onSecondaryLongPress,
  47. Map<Type, Action<Intent>>? actions,
  48. ValueWidgetBuilder<Set<FTappableVariant>> builder = defaultBuilder,
  49. Widget? child,
  50. Map<ShortcutActivator, Intent>? shortcuts,
  51. Key? key,
})

Creates a FTappable without animation.

Contract

Throws AssertionError if builder and child are both null.

Implementation

const new static({
  this.style = const .context(),
  this.focusedOutlineStyle,
  this.semanticsLabel,
  this.semanticsHint,
  this.semanticsTooltip,
  this.semanticsContainer = true,
  this.semanticsButton = true,
  this.semanticsChecked,
  this.semanticsExpanded,
  this.semanticsInMutuallyExclusiveGroup,
  this.semanticsRole,
  this.excludeSemantics = false,
  this.autofocus = false,
  this.hoverFocus = false,
  this.focusNode,
  this.onFocusChange,
  this.onHoverChange,
  this.onVariantChange,
  this.selected = false,
  this.selectable = false,
  this.behavior = .translucent,
  this.onPressDown,
  this.onPressCancel,
  this.onPressMove,
  this.onPressUp,
  this.onPress,
  this.onDisabledPress,
  this.onLongPressDown,
  this.onLongPressCancel,
  this.onLongPressStart,
  this.onLongPressMove,
  this.onLongPressEnd,
  this.onLongPress,
  this.onDoubleTapDown,
  this.onDoubleTapCancel,
  this.onDoubleTap,
  this.onSecondaryPressDown,
  this.onSecondaryPressCancel,
  this.onSecondaryPressUp,
  this.onSecondaryPress,
  this.onSecondaryLongPressDown,
  this.onSecondaryLongPressCancel,
  this.onSecondaryLongPressStart,
  this.onSecondaryLongPressMove,
  this.onSecondaryLongPressEnd,
  this.onSecondaryLongPress,
  this.actions,
  this.builder = defaultBuilder,
  this.child,
  Map<ShortcutActivator, Intent>? shortcuts,
  super.key,
}) : shortcuts =
         shortcuts ??
         (onPress == null && onDisabledPress == null ? const {} : const {SingleActivator(.enter): ActivateIntent()}),
     assert(builder != defaultBuilder || child != null, 'Either builder or child must be provided');