FTappable.static constructor
const
FTappable.static({
- FTappableStyle style()?,
- FFocusedOutlineStyle focusedOutlineStyle()?,
- String? semanticsLabel,
- bool excludeSemantics = false,
- bool autofocus = false,
- FocusNode? focusNode,
- ValueChanged<
bool> ? onFocusChange, - ValueChanged<
bool> ? onHoverChange, - ValueChanged<
FWidgetStatesDelta> ? onStateChange, - bool selected = false,
- HitTestBehavior behavior = HitTestBehavior.translucent,
- VoidCallback? onPress,
- VoidCallback? onLongPress,
- VoidCallback? onSecondaryPress,
- VoidCallback? onSecondaryLongPress,
- Map<
Type, Action< ? actions,Intent> > - ValueWidgetBuilder<
Set< builder = _builder,WidgetState> > - Widget? child,
- Map<
ShortcutActivator, Intent> ? shortcuts, - 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');