Skip to content

Commit

Permalink
Pass custom RouteSettings with FluroRouter.navigateTo
Browse files Browse the repository at this point in the history
  • Loading branch information
lukepighetti committed Oct 16, 2020
1 parent 048ab83 commit acfa580
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/src/fluro_router.dart
Expand Up @@ -47,11 +47,13 @@ class FluroRouter {
bool clearStack = false,
TransitionType transition,
Duration transitionDuration = const Duration(milliseconds: 250),
RouteTransitionsBuilder transitionBuilder}) {
RouteTransitionsBuilder transitionBuilder,
RouteSettings routeSettings}) {
RouteMatch routeMatch = matchRoute(context, path,
transitionType: transition,
transitionsBuilder: transitionBuilder,
transitionDuration: transitionDuration);
transitionDuration: transitionDuration,
routeSettings: routeSettings);
Route<dynamic> route = routeMatch.route;
Completer completer = Completer();
Future future = completer.future;
Expand Down Expand Up @@ -104,6 +106,9 @@ class FluroRouter {
if (routeSettings == null) {
settingsToUse = RouteSettings(name: path);
}
if (routeSettings.name == null) {
settingsToUse = settingsToUse.copyWith(name: path);
}
AppRouteMatch match = _routeTree.matchRoute(path);
AppRoute route = match?.route;
Handler handler = (route != null ? route.handler : notFoundHandler);
Expand Down

0 comments on commit acfa580

Please sign in to comment.