-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Description
应当给GestureDetector设置behavior: HitTestBehavior.opaque属性
@override
Widget build(BuildContext context) {
return WillPopScope(
onWillPop: (){
if(entry != null){
removeOverlay();
}
return Future.value(true);
},
child: GestureDetector(
child: widget.child,
behavior: HitTestBehavior.opaque,
onTap: () {
if (widget.pressType == PressType.singleClick) {
onTap();
}
},
onLongPress: () {
if (widget.pressType == PressType.longPress) {
onTap();
}
},
),
);
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels