router method

GoRouter router()

Implementation

GoRouter router() {
  final routes = _routes.routes();
  if (routes == _last && _router != null) return _router!;
  asserts(routes);
  routes.add(
    GoRoute(
      path: LoginPage.path,
      builder: (context, state) => const LoginPage(),
    ),
  );
  routes.add(
    GoRoute(
      path: ServerSettingsPage.path,
      builder: (context, state) => const ServerSettingsPage(),
    ),
  );
  _router = GoRouter(
    initialLocation: getInitialRoute(),
    routes: routes,
  );
  return _router!;
}