FTappable.static constructor

const FTappable.static({
  1. FTappableStyleDelta style = const .context(),
  2. FFocusedOutlineStyleDelta? focusedOutlineStyle,
  3. String? semanticsLabel,
  4. String? semanticsHint,
  5. bool semanticsButton = true,
  6. bool? semanticsChecked,
  7. bool? semanticsExpanded,
  8. bool? semanticsInMutuallyExclusiveGroup,
  9. bool excludeSemantics = false,
  10. bool autofocus = false,
  11. FocusNode? focusNode,
  12. ValueChanged<bool>? onFocusChange,
  13. ValueChanged<bool>? onHoverChange,
  14. FTappableVariantChangeCallback? onVariantChange,
  15. bool selected = false,
  16. HitTestBehavior behavior = .translucent,
  17. GestureTapDownCallback? onPressDown,
  18. GestureTapCancelCallback? onPressCancel,
  19. GestureTapMoveCallback? onPressMove,
  20. GestureTapUpCallback? onPressUp,
  21. VoidCallback? onPress,
  22. GestureLongPressDownCallback? onLongPressDown,
  23. GestureLongPressCancelCallback? onLongPressCancel,
  24. GestureLongPressStartCallback? onLongPressStart,
  25. GestureLongPressMoveUpdateCallback? onLongPressMove,
  26. GestureLongPressEndCallback? onLongPressEnd,
  27. VoidCallback? onLongPress,
  28. GestureTapDownCallback? onDoubleTapDown,
  29. GestureTapCancelCallback? onDoubleTapCancel,
  30. VoidCallback? onDoubleTap,
  31. GestureTapDownCallback? onSecondaryPressDown,
  32. GestureTapCancelCallback? onSecondaryPressCancel,
  33. GestureTapUpCallback? onSecondaryPressUp,
  34. VoidCallback? onSecondaryPress,
  35. GestureLongPressDownCallback? onSecondaryLongPressDown,
  36. GestureLongPressCancelCallback? onSecondaryLongPressCancel,
  37. GestureLongPressStartCallback? onSecondaryLongPressStart,
  38. GestureLongPressMoveUpdateCallback? onSecondaryLongPressMove,
  39. GestureLongPressEndCallback? onSecondaryLongPressEnd,
  40. VoidCallback? onSecondaryLongPress,
  41. Map<Type, Action<Intent>>? actions,
  42. ValueWidgetBuilder<Set<FTappableVariant>> builder = defaultBuilder,
  43. Widget? child,
  44. Map<ShortcutActivator, Intent>? shortcuts,
  45. 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.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.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 ? const {} : const {SingleActivator(.enter): ActivateIntent()}),
     assert(builder != defaultBuilder || child != null, 'Either builder or child must be provided');