FTappable.static constructor

const FTappable.static({
  1. FTappableStyle style(
    1. FTappableStyle
    )?,
  2. FFocusedOutlineStyle focusedOutlineStyle(
    1. FFocusedOutlineStyle
    )?,
  3. String? semanticsLabel,
  4. bool excludeSemantics = false,
  5. bool autofocus = false,
  6. FocusNode? focusNode,
  7. ValueChanged<bool>? onFocusChange,
  8. ValueChanged<bool>? onHoverChange,
  9. ValueChanged<FWidgetStatesDelta>? onStateChange,
  10. bool selected = false,
  11. HitTestBehavior behavior = HitTestBehavior.translucent,
  12. VoidCallback? onPress,
  13. VoidCallback? onLongPress,
  14. VoidCallback? onSecondaryPress,
  15. VoidCallback? onSecondaryLongPress,
  16. Map<Type, Action<Intent>>? actions,
  17. ValueWidgetBuilder<Set<WidgetState>> builder = _builder,
  18. Widget? child,
  19. Map<ShortcutActivator, Intent>? shortcuts,
  20. Key? key,
})

Creates a FTappable without animation.

Contract

Throws AssertionError if builder and child are both null.

Implementation

const FTappable.static({
  this.style,
  this.focusedOutlineStyle,
  this.semanticsLabel,
  this.excludeSemantics = false,
  this.autofocus = false,
  this.focusNode,
  this.onFocusChange,
  this.onHoverChange,
  this.onStateChange,
  this.selected = false,
  this.behavior = HitTestBehavior.translucent,
  this.onPress,
  this.onLongPress,
  this.onSecondaryPress,
  this.onSecondaryLongPress,
  this.actions,
  this.builder = _builder,
  this.child,
  Map<ShortcutActivator, Intent>? shortcuts,
  super.key,
}) : shortcuts =
         shortcuts ??
         (onPress == null ? const {} : const {SingleActivator(LogicalKeyboardKey.enter): ActivateIntent()}),
     assert(builder != _builder || child != null, 'Either builder or child must be provided');