addRouter method

void addRouter (
  1. {@required String path,
  2. @required RRouterWidgetBuilder routerWidgetBuilder,
  3. RRouterPageBuilderType routerPageBuilderType,
  4. PageTransitionsBuilder routerPageTransitions,
  5. bool isReplaceRouter}
)

you want to add a widget in the navigation , can use it.

Implementation

void addRouter(
    {@required String path,
    @required RRouterWidgetBuilder routerWidgetBuilder,
    RRouterPageBuilderType routerPageBuilderType,
    PageTransitionsBuilder routerPageTransitions,
    bool isReplaceRouter}) {
  if (!_routeMap.containsKey(path) || isReplaceRouter == true) {
    _routeMap[path] = routerWidgetBuilder;
    if (routerPageBuilderType != null) {
      _pageBuilderTypeMap[path] = routerPageBuilderType;
    }
    if (routerPageTransitions != null) {
      _pageTransitionsMap[path] = routerPageTransitions;
    }
  }
}