toOnGenerateInitialRoutes method

List<Route> toOnGenerateInitialRoutes(
  1. String initialRoute
)

Implementation

List<Route<dynamic>> toOnGenerateInitialRoutes(String initialRoute) {
  if (initialRoute == "/") {
    return [
      toRoute(
        RouteSettings(
          name: initialRoute,
        ),
      ),
    ];
  }
  return [
    toRoute(
      const RouteSettings(
        name: "/",
      ),
    ),
    toRoute(
      RouteSettings(
        name: initialRoute,
      ),
    ),
  ];
}