qlevar_router 1.11.1 copy "qlevar_router: ^1.11.1" to clipboard
qlevar_router: ^1.11.1 copied to clipboard

A router that helps you to manage your project routes. Create nested routes. navigation without context between your pages.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:qlevar_router/qlevar_router.dart';

import 'routes/app_routes.dart';
import 'services/auth_service.dart';
import 'services/storage_service.dart';

void main() {
  Get.lazyPut(() => AuthService());
  Get.lazyPut(() => StorageService());
  runApp(const QlevarApp());
}

class QlevarApp extends StatelessWidget {
  const QlevarApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    final appRoutes = AppRoutes();
    appRoutes.setup();
    return MaterialApp.router(
      // Add the [QRouteInformationParser]
      routeInformationParser: const QRouteInformationParser(),
      // Add the [QRouterDelegate] with your routes
      routerDelegate: QRouterDelegate(
        appRoutes.routes,
        observers: [
          // Add your observers to the main navigator
          // to watch for all routes in all navigators use [QR.observer]
        ],
      ),
      theme: ThemeData(colorSchemeSeed: Colors.indigo),
      restorationScopeId: 'app',
    );
  }
}
159
likes
0
pub points
89%
popularity

Publisher

verified publisherqlevar.de

A router that helps you to manage your project routes. Create nested routes. navigation without context between your pages.

Repository (GitHub)
View/report issues

Topics

#navigation #middleware #nested-routes #deep-linking #qlevar-router

License

unknown (license)

Dependencies

flutter, flutter_web_plugins

More

Packages that depend on qlevar_router