Open LatCui opened 2 years ago
`AppRouteMatch? match = _routeTree.matchRoute(path!); AppRoute? route = match?.route; if (transitionDuration == null && route?.transitionDuration != null) { transitionDuration = route?.transitionDuration; }
Handler handler = (route != null ? route.handler : notFoundHandler); TransitionType? transition = transitionType; if (transitionType == null) { transition = route != null ? route.transitionType : TransitionType.native; } if (route == null && notFoundHandler == null) { return RouteMatch( matchType: RouteMatchType.noMatch, errorMessage: "No matching route was found"); } Map<String, List<String>> parameters = match?.parameters ?? <String, List<String>>{}; if (handler.type == HandlerType.function) { handler.handlerFunc(buildContext, parameters); return RouteMatch(matchType: RouteMatchType.nonVisual); }`
if notFoundHandler == null && route == null, Handler handler = (route != null ? route.handler : notFoundHandler); shoud use Handler? handler ,or if (route == null && notFoundHandler == null) can’t execute
`AppRouteMatch? match = _routeTree.matchRoute(path!); AppRoute? route = match?.route; if (transitionDuration == null && route?.transitionDuration != null) { transitionDuration = route?.transitionDuration; }
if notFoundHandler == null && route == null, Handler handler = (route != null ? route.handler : notFoundHandler); shoud use Handler? handler ,or if (route == null && notFoundHandler == null) can’t execute