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 semanticsButton = true,
  7. bool? semanticsChecked,
  8. bool? semanticsExpanded,
  9. bool? semanticsInMutuallyExclusiveGroup,
  10. bool excludeSemantics = false,
  11. bool autofocus = false,
  12. FocusNode? focusNode,
  13. ValueChanged<bool>? onFocusChange,
  14. ValueChanged<bool>? onHoverChange,
  15. FTappableVariantChangeCallback? onVariantChange,
  16. bool selected = false,
  17. HitTestBehavior behavior = .translucent,
  18. GestureTapDownCallback? onPressDown,
  19. GestureTapCancelCallback? onPressCancel,
  20. GestureTapMoveCallback? onPressMove,
  21. GestureTapUpCallback? onPressUp,
  22. VoidCallback? onPress,
  23. VoidCallback? onDisabledPress,
  24. GestureLongPressDownCallback? onLongPressDown,
  25. GestureLongPressCancelCallback? onLongPressCancel,
  26. GestureLongPressStartCallback? onLongPressStart,
  27. GestureLongPressMoveUpdateCallback? onLongPressMove,
  28. GestureLongPressEndCallback? onLongPressEnd,
  29. VoidCallback? onLongPress,
  30. GestureTapDownCallback? onDoubleTapDown,
  31. GestureTapCancelCallback? onDoubleTapCancel,
  32. VoidCallback? onDoubleTap,
  33. GestureTapDownCallback? onSecondaryPressDown,
  34. GestureTapCancelCallback? onSecondaryPressCancel,
  35. GestureTapUpCallback? onSecondaryPressUp,
  36. VoidCallback? onSecondaryPress,
  37. GestureLongPressDownCallback? onSecondaryLongPressDown,
  38. GestureLongPressCancelCallback? onSecondaryLongPressCancel,
  39. GestureLongPressStartCallback? onSecondaryLongPressStart,
  40. GestureLongPressMoveUpdateCallback? onSecondaryLongPressMove,
  41. GestureLongPressEndCallback? onSecondaryLongPressEnd,
  42. VoidCallback? onSecondaryLongPress,
  43. Map<Type, Action<Intent>>? actions,
  44. ValueWidgetBuilder<Set<FTappableVariant>> builder = defaultBuilder,
  45. Widget? child,
  46. Map<ShortcutActivator, Intent>? shortcuts,
  47. Key? key,
})

Creates a FTappable without animation.

Contract

Throws AssertionError if builder and child are both null.

Implementation

const FTappable.static({
  this.style = const .context(),
  this.focusedOutlineStyle,
  this.semanticsLabel,
  this.semanticsHint,
  this.semanticsTooltip,
  this.semanticsButton = true,
  this.semanticsChecked,
  this.semanticsExpanded,
  this.semanticsInMutuallyExclusiveGroup,
  this.excludeSemantics = false,
  this.autofocus = false,
  this.focusNode,
  this.onFocusChange,
  this.onHoverChange,
  this.onVariantChange,
  this.selected = 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');