Showing
5 changed files
with
59 additions
and
28 deletions
| @@ -544,7 +544,7 @@ extension GetNavigation on GetInterface { | @@ -544,7 +544,7 @@ extension GetNavigation on GetInterface { | ||
| 544 | Bindings? binding, | 544 | Bindings? binding, |
| 545 | bool preventDuplicates = true, | 545 | bool preventDuplicates = true, |
| 546 | bool? popGesture, | 546 | bool? popGesture, |
| 547 | - double gestureWidth = 20, | 547 | + double Function(BuildContext context)? gestureWidth, |
| 548 | }) { | 548 | }) { |
| 549 | var routeName = "/${page.runtimeType.toString()}"; | 549 | var routeName = "/${page.runtimeType.toString()}"; |
| 550 | if (preventDuplicates && routeName == currentRoute) { | 550 | if (preventDuplicates && routeName == currentRoute) { |
| @@ -914,7 +914,7 @@ you can only use widgets and widget functions here'''; | @@ -914,7 +914,7 @@ you can only use widgets and widget functions here'''; | ||
| 914 | bool fullscreenDialog = false, | 914 | bool fullscreenDialog = false, |
| 915 | bool preventDuplicates = true, | 915 | bool preventDuplicates = true, |
| 916 | Duration? duration, | 916 | Duration? duration, |
| 917 | - double gestureWidth = 20, | 917 | + double Function(BuildContext context)? gestureWidth, |
| 918 | }) { | 918 | }) { |
| 919 | var routeName = "/${page.runtimeType.toString()}"; | 919 | var routeName = "/${page.runtimeType.toString()}"; |
| 920 | if (preventDuplicates && routeName == currentRoute) { | 920 | if (preventDuplicates && routeName == currentRoute) { |
| @@ -977,7 +977,7 @@ you can only use widgets and widget functions here'''; | @@ -977,7 +977,7 @@ you can only use widgets and widget functions here'''; | ||
| 977 | Transition? transition, | 977 | Transition? transition, |
| 978 | Curve? curve, | 978 | Curve? curve, |
| 979 | Duration? duration, | 979 | Duration? duration, |
| 980 | - double gestureWidth = 20, | 980 | + double Function(BuildContext context)? gestureWidth, |
| 981 | }) { | 981 | }) { |
| 982 | var routeName = "/${page.runtimeType.toString()}"; | 982 | var routeName = "/${page.runtimeType.toString()}"; |
| 983 | 983 |
| @@ -16,7 +16,7 @@ class GetPageRoute<T> extends PageRoute<T> with GetPageRouteTransitionMixin<T> { | @@ -16,7 +16,7 @@ class GetPageRoute<T> extends PageRoute<T> with GetPageRouteTransitionMixin<T> { | ||
| 16 | this.transitionDuration = const Duration(milliseconds: 300), | 16 | this.transitionDuration = const Duration(milliseconds: 300), |
| 17 | this.opaque = true, | 17 | this.opaque = true, |
| 18 | this.parameter, | 18 | this.parameter, |
| 19 | - this.gestureWidth = 20.0, | 19 | + this.gestureWidth, |
| 20 | this.curve, | 20 | this.curve, |
| 21 | this.alignment, | 21 | this.alignment, |
| 22 | this.transition, | 22 | this.transition, |
| @@ -29,6 +29,7 @@ class GetPageRoute<T> extends PageRoute<T> with GetPageRouteTransitionMixin<T> { | @@ -29,6 +29,7 @@ class GetPageRoute<T> extends PageRoute<T> with GetPageRouteTransitionMixin<T> { | ||
| 29 | this.routeName, | 29 | this.routeName, |
| 30 | this.page, | 30 | this.page, |
| 31 | this.title, | 31 | this.title, |
| 32 | + this.showCupertinoParallax = true, | ||
| 32 | this.barrierLabel, | 33 | this.barrierLabel, |
| 33 | this.maintainState = true, | 34 | this.maintainState = true, |
| 34 | bool fullscreenDialog = false, | 35 | bool fullscreenDialog = false, |
| @@ -47,6 +48,9 @@ class GetPageRoute<T> extends PageRoute<T> with GetPageRouteTransitionMixin<T> { | @@ -47,6 +48,9 @@ class GetPageRoute<T> extends PageRoute<T> with GetPageRouteTransitionMixin<T> { | ||
| 47 | final List<Bindings>? bindings; | 48 | final List<Bindings>? bindings; |
| 48 | 49 | ||
| 49 | @override | 50 | @override |
| 51 | + final bool showCupertinoParallax; | ||
| 52 | + | ||
| 53 | + @override | ||
| 50 | final bool opaque; | 54 | final bool opaque; |
| 51 | final bool? popGesture; | 55 | final bool? popGesture; |
| 52 | 56 | ||
| @@ -109,5 +113,5 @@ class GetPageRoute<T> extends PageRoute<T> with GetPageRouteTransitionMixin<T> { | @@ -109,5 +113,5 @@ class GetPageRoute<T> extends PageRoute<T> with GetPageRouteTransitionMixin<T> { | ||
| 109 | String get debugLabel => '${super.debugLabel}(${settings.name})'; | 113 | String get debugLabel => '${super.debugLabel}(${settings.name})'; |
| 110 | 114 | ||
| 111 | @override | 115 | @override |
| 112 | - final double gestureWidth; | 116 | + final double Function(BuildContext context)? gestureWidth; |
| 113 | } | 117 | } |
| @@ -38,7 +38,7 @@ class GetPage<T> extends Page<T> { | @@ -38,7 +38,7 @@ class GetPage<T> extends Page<T> { | ||
| 38 | final Alignment? alignment; | 38 | final Alignment? alignment; |
| 39 | final bool maintainState; | 39 | final bool maintainState; |
| 40 | final bool opaque; | 40 | final bool opaque; |
| 41 | - final double gestureWidth; | 41 | + final double Function(BuildContext context)? gestureWidth; |
| 42 | final Bindings? binding; | 42 | final Bindings? binding; |
| 43 | final List<Bindings> bindings; | 43 | final List<Bindings> bindings; |
| 44 | final CustomTransition? customTransition; | 44 | final CustomTransition? customTransition; |
| @@ -61,13 +61,14 @@ class GetPage<T> extends Page<T> { | @@ -61,13 +61,14 @@ class GetPage<T> extends Page<T> { | ||
| 61 | final List<GetMiddleware>? middlewares; | 61 | final List<GetMiddleware>? middlewares; |
| 62 | final PathDecoded path; | 62 | final PathDecoded path; |
| 63 | final GetPage? unknownRoute; | 63 | final GetPage? unknownRoute; |
| 64 | + final bool showCupertinoParallax; | ||
| 64 | 65 | ||
| 65 | GetPage({ | 66 | GetPage({ |
| 66 | required this.name, | 67 | required this.name, |
| 67 | required this.page, | 68 | required this.page, |
| 68 | this.title, | 69 | this.title, |
| 69 | this.participatesInRootNavigator, | 70 | this.participatesInRootNavigator, |
| 70 | - this.gestureWidth = 20, | 71 | + this.gestureWidth, |
| 71 | // RouteSettings settings, | 72 | // RouteSettings settings, |
| 72 | this.maintainState = true, | 73 | this.maintainState = true, |
| 73 | this.curve = Curves.linear, | 74 | this.curve = Curves.linear, |
| @@ -85,6 +86,7 @@ class GetPage<T> extends Page<T> { | @@ -85,6 +86,7 @@ class GetPage<T> extends Page<T> { | ||
| 85 | this.middlewares, | 86 | this.middlewares, |
| 86 | this.unknownRoute, | 87 | this.unknownRoute, |
| 87 | this.arguments, | 88 | this.arguments, |
| 89 | + this.showCupertinoParallax = true, | ||
| 88 | this.preventDuplicates = true, | 90 | this.preventDuplicates = true, |
| 89 | }) : path = _nameToRegex(name), | 91 | }) : path = _nameToRegex(name), |
| 90 | super( | 92 | super( |
| @@ -136,9 +138,10 @@ class GetPage<T> extends Page<T> { | @@ -136,9 +138,10 @@ class GetPage<T> extends Page<T> { | ||
| 136 | GetPage? unknownRoute, | 138 | GetPage? unknownRoute, |
| 137 | List<GetMiddleware>? middlewares, | 139 | List<GetMiddleware>? middlewares, |
| 138 | bool? preventDuplicates, | 140 | bool? preventDuplicates, |
| 139 | - double? gestureWidth, | 141 | + final double Function(BuildContext context)? gestureWidth, |
| 140 | bool? participatesInRootNavigator, | 142 | bool? participatesInRootNavigator, |
| 141 | Object? arguments, | 143 | Object? arguments, |
| 144 | + bool? showCupertinoParallax, | ||
| 142 | }) { | 145 | }) { |
| 143 | return GetPage( | 146 | return GetPage( |
| 144 | participatesInRootNavigator: | 147 | participatesInRootNavigator: |
| @@ -164,6 +167,8 @@ class GetPage<T> extends Page<T> { | @@ -164,6 +167,8 @@ class GetPage<T> extends Page<T> { | ||
| 164 | middlewares: middlewares ?? this.middlewares, | 167 | middlewares: middlewares ?? this.middlewares, |
| 165 | gestureWidth: gestureWidth ?? this.gestureWidth, | 168 | gestureWidth: gestureWidth ?? this.gestureWidth, |
| 166 | arguments: arguments ?? this.arguments, | 169 | arguments: arguments ?? this.arguments, |
| 170 | + showCupertinoParallax: | ||
| 171 | + showCupertinoParallax ?? this.showCupertinoParallax, | ||
| 167 | ); | 172 | ); |
| 168 | } | 173 | } |
| 169 | 174 |
| @@ -10,7 +10,7 @@ import '../../../get.dart'; | @@ -10,7 +10,7 @@ import '../../../get.dart'; | ||
| 10 | import 'default_transitions.dart'; | 10 | import 'default_transitions.dart'; |
| 11 | import 'transitions_type.dart'; | 11 | import 'transitions_type.dart'; |
| 12 | 12 | ||
| 13 | -//const double _kBackGestureWidth = 20.0; | 13 | +const double _kBackGestureWidth = 20.0; |
| 14 | const double _kMinFlingVelocity = 1.0; // Screen widths per second. | 14 | const double _kMinFlingVelocity = 1.0; // Screen widths per second. |
| 15 | 15 | ||
| 16 | // An eyeballed value for the maximum time it takes | 16 | // An eyeballed value for the maximum time it takes |
| @@ -36,7 +36,7 @@ mixin GetPageRouteTransitionMixin<T> on PageRoute<T> { | @@ -36,7 +36,7 @@ mixin GetPageRouteTransitionMixin<T> on PageRoute<T> { | ||
| 36 | /// {@endtemplate} | 36 | /// {@endtemplate} |
| 37 | String? get title; | 37 | String? get title; |
| 38 | 38 | ||
| 39 | - double get gestureWidth; | 39 | + double Function(BuildContext context)? get gestureWidth; |
| 40 | 40 | ||
| 41 | ValueNotifier<String?>? _previousTitle; | 41 | ValueNotifier<String?>? _previousTitle; |
| 42 | 42 | ||
| @@ -86,12 +86,16 @@ Cannot read the previousTitle for a route that has not yet been installed''', | @@ -86,12 +86,16 @@ Cannot read the previousTitle for a route that has not yet been installed''', | ||
| 86 | @override | 86 | @override |
| 87 | String? get barrierLabel => null; | 87 | String? get barrierLabel => null; |
| 88 | 88 | ||
| 89 | + bool get showCupertinoParallax; | ||
| 90 | + | ||
| 89 | @override | 91 | @override |
| 90 | bool canTransitionTo(TransitionRoute<dynamic> nextRoute) { | 92 | bool canTransitionTo(TransitionRoute<dynamic> nextRoute) { |
| 91 | // Don't perform outgoing animation if the next route is a | 93 | // Don't perform outgoing animation if the next route is a |
| 92 | // fullscreen dialog. | 94 | // fullscreen dialog. |
| 93 | - return nextRoute is CupertinoRouteTransitionMixin && | ||
| 94 | - !nextRoute.fullscreenDialog; | 95 | + |
| 96 | + return nextRoute is GetPageRouteTransitionMixin && | ||
| 97 | + !nextRoute.fullscreenDialog && | ||
| 98 | + nextRoute.showCupertinoParallax; | ||
| 95 | } | 99 | } |
| 96 | 100 | ||
| 97 | /// True if an iOS-style back swipe pop gesture is currently | 101 | /// True if an iOS-style back swipe pop gesture is currently |
| @@ -231,7 +235,8 @@ Cannot read the previousTitle for a route that has not yet been installed''', | @@ -231,7 +235,8 @@ Cannot read the previousTitle for a route that has not yet been installed''', | ||
| 231 | secondaryAnimation, | 235 | secondaryAnimation, |
| 232 | route.popGesture ?? Get.defaultPopGesture | 236 | route.popGesture ?? Get.defaultPopGesture |
| 233 | ? CupertinoBackGestureDetector<T>( | 237 | ? CupertinoBackGestureDetector<T>( |
| 234 | - gestureWidth: route.gestureWidth, | 238 | + gestureWidth: |
| 239 | + route.gestureWidth?.call(context) ?? _kBackGestureWidth, | ||
| 235 | enabledCallback: () => _isPopGestureEnabled<T>(route), | 240 | enabledCallback: () => _isPopGestureEnabled<T>(route), |
| 236 | onStartPopGesture: () => _startPopGesture<T>(route), | 241 | onStartPopGesture: () => _startPopGesture<T>(route), |
| 237 | child: child) | 242 | child: child) |
| @@ -253,7 +258,8 @@ Cannot read the previousTitle for a route that has not yet been installed''', | @@ -253,7 +258,8 @@ Cannot read the previousTitle for a route that has not yet been installed''', | ||
| 253 | secondaryAnimation, | 258 | secondaryAnimation, |
| 254 | route.popGesture ?? Get.defaultPopGesture | 259 | route.popGesture ?? Get.defaultPopGesture |
| 255 | ? CupertinoBackGestureDetector<T>( | 260 | ? CupertinoBackGestureDetector<T>( |
| 256 | - gestureWidth: route.gestureWidth, | 261 | + gestureWidth: route.gestureWidth?.call(context) ?? |
| 262 | + _kBackGestureWidth, | ||
| 257 | enabledCallback: () => _isPopGestureEnabled<T>(route), | 263 | enabledCallback: () => _isPopGestureEnabled<T>(route), |
| 258 | onStartPopGesture: () => _startPopGesture<T>(route), | 264 | onStartPopGesture: () => _startPopGesture<T>(route), |
| 259 | child: child) | 265 | child: child) |
| @@ -268,7 +274,8 @@ Cannot read the previousTitle for a route that has not yet been installed''', | @@ -268,7 +274,8 @@ Cannot read the previousTitle for a route that has not yet been installed''', | ||
| 268 | secondaryAnimation, | 274 | secondaryAnimation, |
| 269 | route.popGesture ?? Get.defaultPopGesture | 275 | route.popGesture ?? Get.defaultPopGesture |
| 270 | ? CupertinoBackGestureDetector<T>( | 276 | ? CupertinoBackGestureDetector<T>( |
| 271 | - gestureWidth: route.gestureWidth, | 277 | + gestureWidth: route.gestureWidth?.call(context) ?? |
| 278 | + _kBackGestureWidth, | ||
| 272 | enabledCallback: () => _isPopGestureEnabled<T>(route), | 279 | enabledCallback: () => _isPopGestureEnabled<T>(route), |
| 273 | onStartPopGesture: () => _startPopGesture<T>(route), | 280 | onStartPopGesture: () => _startPopGesture<T>(route), |
| 274 | child: child) | 281 | child: child) |
| @@ -283,7 +290,8 @@ Cannot read the previousTitle for a route that has not yet been installed''', | @@ -283,7 +290,8 @@ Cannot read the previousTitle for a route that has not yet been installed''', | ||
| 283 | secondaryAnimation, | 290 | secondaryAnimation, |
| 284 | route.popGesture ?? Get.defaultPopGesture | 291 | route.popGesture ?? Get.defaultPopGesture |
| 285 | ? CupertinoBackGestureDetector<T>( | 292 | ? CupertinoBackGestureDetector<T>( |
| 286 | - gestureWidth: route.gestureWidth, | 293 | + gestureWidth: route.gestureWidth?.call(context) ?? |
| 294 | + _kBackGestureWidth, | ||
| 287 | enabledCallback: () => _isPopGestureEnabled<T>(route), | 295 | enabledCallback: () => _isPopGestureEnabled<T>(route), |
| 288 | onStartPopGesture: () => _startPopGesture<T>(route), | 296 | onStartPopGesture: () => _startPopGesture<T>(route), |
| 289 | child: child) | 297 | child: child) |
| @@ -292,7 +300,8 @@ Cannot read the previousTitle for a route that has not yet been installed''', | @@ -292,7 +300,8 @@ Cannot read the previousTitle for a route that has not yet been installed''', | ||
| 292 | case Transition.noTransition: | 300 | case Transition.noTransition: |
| 293 | return route.popGesture ?? Get.defaultPopGesture | 301 | return route.popGesture ?? Get.defaultPopGesture |
| 294 | ? CupertinoBackGestureDetector<T>( | 302 | ? CupertinoBackGestureDetector<T>( |
| 295 | - gestureWidth: route.gestureWidth, | 303 | + gestureWidth: |
| 304 | + route.gestureWidth?.call(context) ?? _kBackGestureWidth, | ||
| 296 | enabledCallback: () => _isPopGestureEnabled<T>(route), | 305 | enabledCallback: () => _isPopGestureEnabled<T>(route), |
| 297 | onStartPopGesture: () => _startPopGesture<T>(route), | 306 | onStartPopGesture: () => _startPopGesture<T>(route), |
| 298 | child: child) | 307 | child: child) |
| @@ -307,7 +316,8 @@ Cannot read the previousTitle for a route that has not yet been installed''', | @@ -307,7 +316,8 @@ Cannot read the previousTitle for a route that has not yet been installed''', | ||
| 307 | secondaryAnimation, | 316 | secondaryAnimation, |
| 308 | route.popGesture ?? Get.defaultPopGesture | 317 | route.popGesture ?? Get.defaultPopGesture |
| 309 | ? CupertinoBackGestureDetector<T>( | 318 | ? CupertinoBackGestureDetector<T>( |
| 310 | - gestureWidth: route.gestureWidth, | 319 | + gestureWidth: route.gestureWidth?.call(context) ?? |
| 320 | + _kBackGestureWidth, | ||
| 311 | enabledCallback: () => _isPopGestureEnabled<T>(route), | 321 | enabledCallback: () => _isPopGestureEnabled<T>(route), |
| 312 | onStartPopGesture: () => _startPopGesture<T>(route), | 322 | onStartPopGesture: () => _startPopGesture<T>(route), |
| 313 | child: child) | 323 | child: child) |
| @@ -322,7 +332,8 @@ Cannot read the previousTitle for a route that has not yet been installed''', | @@ -322,7 +332,8 @@ Cannot read the previousTitle for a route that has not yet been installed''', | ||
| 322 | secondaryAnimation, | 332 | secondaryAnimation, |
| 323 | route.popGesture ?? Get.defaultPopGesture | 333 | route.popGesture ?? Get.defaultPopGesture |
| 324 | ? CupertinoBackGestureDetector<T>( | 334 | ? CupertinoBackGestureDetector<T>( |
| 325 | - gestureWidth: route.gestureWidth, | 335 | + gestureWidth: route.gestureWidth?.call(context) ?? |
| 336 | + _kBackGestureWidth, | ||
| 326 | enabledCallback: () => _isPopGestureEnabled<T>(route), | 337 | enabledCallback: () => _isPopGestureEnabled<T>(route), |
| 327 | onStartPopGesture: () => _startPopGesture<T>(route), | 338 | onStartPopGesture: () => _startPopGesture<T>(route), |
| 328 | child: child) | 339 | child: child) |
| @@ -337,7 +348,8 @@ Cannot read the previousTitle for a route that has not yet been installed''', | @@ -337,7 +348,8 @@ Cannot read the previousTitle for a route that has not yet been installed''', | ||
| 337 | secondaryAnimation, | 348 | secondaryAnimation, |
| 338 | route.popGesture ?? Get.defaultPopGesture | 349 | route.popGesture ?? Get.defaultPopGesture |
| 339 | ? CupertinoBackGestureDetector<T>( | 350 | ? CupertinoBackGestureDetector<T>( |
| 340 | - gestureWidth: route.gestureWidth, | 351 | + gestureWidth: route.gestureWidth?.call(context) ?? |
| 352 | + _kBackGestureWidth, | ||
| 341 | enabledCallback: () => _isPopGestureEnabled<T>(route), | 353 | enabledCallback: () => _isPopGestureEnabled<T>(route), |
| 342 | onStartPopGesture: () => _startPopGesture<T>(route), | 354 | onStartPopGesture: () => _startPopGesture<T>(route), |
| 343 | child: child) | 355 | child: child) |
| @@ -352,7 +364,8 @@ Cannot read the previousTitle for a route that has not yet been installed''', | @@ -352,7 +364,8 @@ Cannot read the previousTitle for a route that has not yet been installed''', | ||
| 352 | secondaryAnimation, | 364 | secondaryAnimation, |
| 353 | route.popGesture ?? Get.defaultPopGesture | 365 | route.popGesture ?? Get.defaultPopGesture |
| 354 | ? CupertinoBackGestureDetector<T>( | 366 | ? CupertinoBackGestureDetector<T>( |
| 355 | - gestureWidth: route.gestureWidth, | 367 | + gestureWidth: route.gestureWidth?.call(context) ?? |
| 368 | + _kBackGestureWidth, | ||
| 356 | enabledCallback: () => _isPopGestureEnabled<T>(route), | 369 | enabledCallback: () => _isPopGestureEnabled<T>(route), |
| 357 | onStartPopGesture: () => _startPopGesture<T>(route), | 370 | onStartPopGesture: () => _startPopGesture<T>(route), |
| 358 | child: child) | 371 | child: child) |
| @@ -367,7 +380,8 @@ Cannot read the previousTitle for a route that has not yet been installed''', | @@ -367,7 +380,8 @@ Cannot read the previousTitle for a route that has not yet been installed''', | ||
| 367 | secondaryAnimation, | 380 | secondaryAnimation, |
| 368 | route.popGesture ?? Get.defaultPopGesture | 381 | route.popGesture ?? Get.defaultPopGesture |
| 369 | ? CupertinoBackGestureDetector<T>( | 382 | ? CupertinoBackGestureDetector<T>( |
| 370 | - gestureWidth: route.gestureWidth, | 383 | + gestureWidth: route.gestureWidth?.call(context) ?? |
| 384 | + _kBackGestureWidth, | ||
| 371 | enabledCallback: () => _isPopGestureEnabled<T>(route), | 385 | enabledCallback: () => _isPopGestureEnabled<T>(route), |
| 372 | onStartPopGesture: () => _startPopGesture<T>(route), | 386 | onStartPopGesture: () => _startPopGesture<T>(route), |
| 373 | child: child) | 387 | child: child) |
| @@ -379,7 +393,8 @@ Cannot read the previousTitle for a route that has not yet been installed''', | @@ -379,7 +393,8 @@ Cannot read the previousTitle for a route that has not yet been installed''', | ||
| 379 | secondaryRouteAnimation: secondaryAnimation, | 393 | secondaryRouteAnimation: secondaryAnimation, |
| 380 | linearTransition: linearTransition, | 394 | linearTransition: linearTransition, |
| 381 | child: CupertinoBackGestureDetector<T>( | 395 | child: CupertinoBackGestureDetector<T>( |
| 382 | - gestureWidth: route.gestureWidth, | 396 | + gestureWidth: |
| 397 | + route.gestureWidth?.call(context) ?? _kBackGestureWidth, | ||
| 383 | enabledCallback: () => _isPopGestureEnabled<T>(route), | 398 | enabledCallback: () => _isPopGestureEnabled<T>(route), |
| 384 | onStartPopGesture: () => _startPopGesture<T>(route), | 399 | onStartPopGesture: () => _startPopGesture<T>(route), |
| 385 | child: child, | 400 | child: child, |
| @@ -395,7 +410,8 @@ Cannot read the previousTitle for a route that has not yet been installed''', | @@ -395,7 +410,8 @@ Cannot read the previousTitle for a route that has not yet been installed''', | ||
| 395 | secondaryAnimation, | 410 | secondaryAnimation, |
| 396 | route.popGesture ?? Get.defaultPopGesture | 411 | route.popGesture ?? Get.defaultPopGesture |
| 397 | ? CupertinoBackGestureDetector<T>( | 412 | ? CupertinoBackGestureDetector<T>( |
| 398 | - gestureWidth: route.gestureWidth, | 413 | + gestureWidth: route.gestureWidth?.call(context) ?? |
| 414 | + _kBackGestureWidth, | ||
| 399 | enabledCallback: () => _isPopGestureEnabled<T>(route), | 415 | enabledCallback: () => _isPopGestureEnabled<T>(route), |
| 400 | onStartPopGesture: () => _startPopGesture<T>(route), | 416 | onStartPopGesture: () => _startPopGesture<T>(route), |
| 401 | child: child) | 417 | child: child) |
| @@ -409,7 +425,8 @@ Cannot read the previousTitle for a route that has not yet been installed''', | @@ -409,7 +425,8 @@ Cannot read the previousTitle for a route that has not yet been installed''', | ||
| 409 | secondaryAnimation, | 425 | secondaryAnimation, |
| 410 | route.popGesture ?? Get.defaultPopGesture | 426 | route.popGesture ?? Get.defaultPopGesture |
| 411 | ? CupertinoBackGestureDetector<T>( | 427 | ? CupertinoBackGestureDetector<T>( |
| 412 | - gestureWidth: route.gestureWidth, | 428 | + gestureWidth: route.gestureWidth?.call(context) ?? |
| 429 | + _kBackGestureWidth, | ||
| 413 | enabledCallback: () => _isPopGestureEnabled<T>(route), | 430 | enabledCallback: () => _isPopGestureEnabled<T>(route), |
| 414 | onStartPopGesture: () => _startPopGesture<T>(route), | 431 | onStartPopGesture: () => _startPopGesture<T>(route), |
| 415 | child: child) | 432 | child: child) |
| @@ -423,7 +440,8 @@ Cannot read the previousTitle for a route that has not yet been installed''', | @@ -423,7 +440,8 @@ Cannot read the previousTitle for a route that has not yet been installed''', | ||
| 423 | secondaryAnimation, | 440 | secondaryAnimation, |
| 424 | route.popGesture ?? Get.defaultPopGesture | 441 | route.popGesture ?? Get.defaultPopGesture |
| 425 | ? CupertinoBackGestureDetector<T>( | 442 | ? CupertinoBackGestureDetector<T>( |
| 426 | - gestureWidth: route.gestureWidth, | 443 | + gestureWidth: route.gestureWidth?.call(context) ?? |
| 444 | + _kBackGestureWidth, | ||
| 427 | enabledCallback: () => _isPopGestureEnabled<T>(route), | 445 | enabledCallback: () => _isPopGestureEnabled<T>(route), |
| 428 | onStartPopGesture: () => _startPopGesture<T>(route), | 446 | onStartPopGesture: () => _startPopGesture<T>(route), |
| 429 | child: child) | 447 | child: child) |
| @@ -437,7 +455,8 @@ Cannot read the previousTitle for a route that has not yet been installed''', | @@ -437,7 +455,8 @@ Cannot read the previousTitle for a route that has not yet been installed''', | ||
| 437 | secondaryAnimation, | 455 | secondaryAnimation, |
| 438 | route.popGesture ?? Get.defaultPopGesture | 456 | route.popGesture ?? Get.defaultPopGesture |
| 439 | ? CupertinoBackGestureDetector<T>( | 457 | ? CupertinoBackGestureDetector<T>( |
| 440 | - gestureWidth: route.gestureWidth, | 458 | + gestureWidth: route.gestureWidth?.call(context) ?? |
| 459 | + _kBackGestureWidth, | ||
| 441 | enabledCallback: () => _isPopGestureEnabled<T>(route), | 460 | enabledCallback: () => _isPopGestureEnabled<T>(route), |
| 442 | onStartPopGesture: () => _startPopGesture<T>(route), | 461 | onStartPopGesture: () => _startPopGesture<T>(route), |
| 443 | child: child) | 462 | child: child) |
| @@ -456,7 +475,8 @@ Cannot read the previousTitle for a route that has not yet been installed''', | @@ -456,7 +475,8 @@ Cannot read the previousTitle for a route that has not yet been installed''', | ||
| 456 | secondaryAnimation, | 475 | secondaryAnimation, |
| 457 | route.popGesture ?? Get.defaultPopGesture | 476 | route.popGesture ?? Get.defaultPopGesture |
| 458 | ? CupertinoBackGestureDetector<T>( | 477 | ? CupertinoBackGestureDetector<T>( |
| 459 | - gestureWidth: route.gestureWidth, | 478 | + gestureWidth: route.gestureWidth?.call(context) ?? |
| 479 | + _kBackGestureWidth, | ||
| 460 | enabledCallback: () => _isPopGestureEnabled<T>(route), | 480 | enabledCallback: () => _isPopGestureEnabled<T>(route), |
| 461 | onStartPopGesture: () => _startPopGesture<T>(route), | 481 | onStartPopGesture: () => _startPopGesture<T>(route), |
| 462 | child: child) | 482 | child: child) |
| @@ -207,6 +207,7 @@ class PageRedirect { | @@ -207,6 +207,7 @@ class PageRedirect { | ||
| 207 | : settings, | 207 | : settings, |
| 208 | curve: _r.curve, | 208 | curve: _r.curve, |
| 209 | opaque: _r.opaque, | 209 | opaque: _r.opaque, |
| 210 | + showCupertinoParallax: _r.showCupertinoParallax, | ||
| 210 | gestureWidth: _r.gestureWidth, | 211 | gestureWidth: _r.gestureWidth, |
| 211 | customTransition: _r.customTransition, | 212 | customTransition: _r.customTransition, |
| 212 | binding: _r.binding, | 213 | binding: _r.binding, |
| @@ -234,6 +235,7 @@ class PageRedirect { | @@ -234,6 +235,7 @@ class PageRedirect { | ||
| 234 | routeName: _r.name, | 235 | routeName: _r.name, |
| 235 | settings: _r, | 236 | settings: _r, |
| 236 | curve: _r.curve, | 237 | curve: _r.curve, |
| 238 | + showCupertinoParallax: _r.showCupertinoParallax, | ||
| 237 | gestureWidth: _r.gestureWidth, | 239 | gestureWidth: _r.gestureWidth, |
| 238 | opaque: _r.opaque, | 240 | opaque: _r.opaque, |
| 239 | customTransition: _r.customTransition, | 241 | customTransition: _r.customTransition, |
-
Please register or login to post a comment