fix: RadialMenuOverlay gesture-eating bug IgnorePointer when not visible + status listener to trigger rebuild on dismiss
This commit is contained in:
parent
d6204db5c4
commit
ea692da571
|
|
@ -37,6 +37,13 @@ class _RadialMenuOverlayState extends State<RadialMenuOverlay>
|
|||
vsync: this,
|
||||
);
|
||||
|
||||
// Rebuild when animation dismisses so the SizedBox.shrink check fires
|
||||
_controller.addStatusListener((status) {
|
||||
if (status == AnimationStatus.dismissed && mounted) {
|
||||
setState(() {});
|
||||
}
|
||||
});
|
||||
|
||||
_scaleAnimation = CurvedAnimation(
|
||||
parent: _controller,
|
||||
curve: Curves.easeOutBack,
|
||||
|
|
@ -72,9 +79,11 @@ class _RadialMenuOverlayState extends State<RadialMenuOverlay>
|
|||
return const SizedBox.shrink();
|
||||
}
|
||||
|
||||
return GestureDetector(
|
||||
onTap: widget.onDismiss,
|
||||
child: AnimatedBuilder(
|
||||
return IgnorePointer(
|
||||
ignoring: !widget.isVisible,
|
||||
child: GestureDetector(
|
||||
onTap: widget.onDismiss,
|
||||
child: AnimatedBuilder(
|
||||
animation: _controller,
|
||||
builder: (context, child) {
|
||||
return Stack(
|
||||
|
|
@ -102,6 +111,7 @@ class _RadialMenuOverlayState extends State<RadialMenuOverlay>
|
|||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue