fix android back gesture. Close #544

This commit is contained in:
2025-10-12 19:49:33 +08:00
parent 29d25f7fcd
commit 0eb5d76687

View File

@@ -128,7 +128,7 @@ mixin _AppRouteTransitionMixin<T> on PageRoute<T> {
context, context,
animation, animation,
secondaryAnimation, secondaryAnimation,
enableIOSGesture enableIOSGesture && App.isIOS
? IOSBackGestureDetector( ? IOSBackGestureDetector(
gestureWidth: _kBackGestureWidth, gestureWidth: _kBackGestureWidth,
enabledCallback: () => _isPopGestureEnabled<T>(this), enabledCallback: () => _isPopGestureEnabled<T>(this),
@@ -302,7 +302,7 @@ class _IOSBackGestureDetectorState extends State<IOSBackGestureDetector> {
assert(mounted); assert(mounted);
assert(_backGestureController != null); assert(_backGestureController != null);
_backGestureController!.dragUpdate( _backGestureController!.dragUpdate(
_convertToLogical(details.primaryDelta! / context.size!.width)); _convertToLogical(details.primaryDelta! / context.size!.width));
} }
} }