AntdTapOptions class
Constructors
- AntdTapOptions.new({HitTestBehavior behavior = HitTestBehavior.deferToChild, double touchSlop = 8.0, int doubleTapTimeout = 300, int longPressTimeout = 200, bool alwaysTriggerTap = false, bool allowOffset = false, bool disabled = false, Duration? throttle, Duration? debounce, AntdHapticFeedback? hapticFeedback, Duration feedbackDuration = const Duration(milliseconds: 200), bool alwaysReceiveTap = false})
-
const
Properties
- allowOffset → bool
-
是否允许事件坐标偏移(用于处理触摸点与渲染位置偏差的场景)
final
- alwaysReceiveTap → bool
-
一直接收触摸
final
- alwaysTriggerTap → bool
-
当使用双击和长按以及穿透是否触发 tap
final
- behavior → HitTestBehavior
-
点击测试行为(决定组件如何响应命中测试,如透明区域是否可点击)
final
- debounce → Duration?
-
事件防抖时长(延迟触发事件,如搜索框输入停止后才触发搜索)
final
- disabled → bool
-
是否禁用所有手势交互(true 时组件将不会响应任何手势)
final
- doubleTapTimeout → int
-
双击事件的时间窗口(单位:毫秒,两次点击间隔小于该值视为双击)
final
- feedbackDuration → Duration
-
反馈的时长(反馈样式发生时保持的时间)
final
- hapticFeedback → AntdHapticFeedback?
-
触觉反馈类型(用户交互时设备的震动反馈强度,如 light/medium/heavy)
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- longPressTimeout → int
-
长按触发时间(单位:毫秒,按压持续时间超过该值触发长按事件)
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- throttle → Duration?
-
事件节流时长(避免高频事件触发,如限制滚动事件的触发频率)
final
- touchSlop → double
-
触摸滑动阈值(单位:逻辑像素,触摸移动超过该距离则不再视为点击)
final
Methods
-
copyFrom(
AntdTapOptions? options) → AntdTapOptions -
copyWith(
{HitTestBehavior? behavior, double? touchSlop, int? doubleTapTimeout, int? longPressTimeout, bool? alwaysTriggerTap, bool? allowOffset, bool? disabled, Duration? throttle, Duration? debounce, Duration? feedbackDuration, AntdHapticFeedback? hapticFeedback, bool? alwaysReceiveTap}) → AntdTapOptions -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited