FTappable constructor

const FTappable({
  1. FFocusedOutlineStyle? focusedOutlineStyle,
  2. String? semanticLabel,
  3. bool semanticSelected = false,
  4. bool excludeSemantics = false,
  5. bool autofocus = false,
  6. FocusNode? focusNode,
  7. ValueChanged<bool>? onFocusChange,
  8. Duration touchHoverEnterDuration = const Duration(milliseconds: 200),
  9. Duration touchHoverExitDuration = Duration.zero,
  10. HitTestBehavior behavior = HitTestBehavior.translucent,
  11. VoidCallback? onPress,
  12. VoidCallback? onLongPress,
  13. Widget? child,
  14. ValueWidgetBuilder<FTappableData>? builder,
  15. Key? key,
})

Creates a FTappable.

Contract

Throws AssertionError if builder and child are both null.

Implementation

const FTappable({
  this.focusedOutlineStyle,
  this.semanticLabel,
  this.semanticSelected = false,
  this.excludeSemantics = false,
  this.autofocus = false,
  this.focusNode,
  this.onFocusChange,
  this.touchHoverEnterDuration = const Duration(milliseconds: 200),
  this.touchHoverExitDuration = Duration.zero,
  this.behavior = HitTestBehavior.translucent,
  this.onPress,
  this.onLongPress,
  this.child,
  ValueWidgetBuilder<FTappableData>? builder,
  super.key,
})  : assert(builder != null || child != null, 'Either builder or child must be provided.'),
      builder = builder ?? _builder;