FTappable.static constructor

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