addRoutes method

void addRoutes(
  1. List<NyRouterRoute> routes
)

Add a list of routes at once.

Implementation

void addRoutes(List<NyRouterRoute> routes) {
  if (routes.isNotEmpty) {
    routes.forEach((route) => this._addRoute(route));
  }
  NyNavigator.instance.router = this;
}