Browse Source

fix: respect transitionDuration in navigateTo()

It was applying the default route's transitionDuration to any navigateTo(), even if another value was passed.
Now, it will apply the default value only if a transitionDuration was not passed.
Leonardo Salazar 4 years ago
parent
commit
65d5b88e2e
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lib/src/fluro_router.dart

+ 1 - 1
lib/src/fluro_router.dart

@@ -135,7 +135,7 @@ class FluroRouter {
     AppRouteMatch? match = _routeTree.matchRoute(path!);
     AppRoute? route = match?.route;
 
-    if (route?.transitionDuration != null) {
+    if (transitionDuration == null && route?.transitionDuration != null) {
       transitionDuration = route?.transitionDuration;
     }