go_router_aggregator 1.0.0 copy "go_router_aggregator: ^1.0.0" to clipboard
go_router_aggregator: ^1.0.0 copied to clipboard

A build_runner plugin that scans all *.g.dart files for $appRoutes and emits a merged aggregated_app_routes.g.dart.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
import 'package:go_router_aggregator_example/pages/home_page/home_page.dart';

import 'navigation/app_routes.g.dart';

void main() => runApp(const App());

class App extends StatelessWidget {
  const App({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp.router(
      routerConfig: GoRouter(
        // a collection of all type-safe routes gathered across the project
        // generated by the go_router_aggregator
        routes: $aggregatedRoutes,
        initialLocation: const HomePageRoute().location,
      ),
    );
  }
}
2
likes
0
points
75
downloads

Publisher

verified publishermitryp.com.ua

Weekly Downloads

A build_runner plugin that scans all *.g.dart files for $appRoutes and emits a merged aggregated_app_routes.g.dart.

Repository (GitHub)
View/report issues

Topics

#codegen #go-router #navigation #build-runner

License

unknown (license)

Dependencies

build, glob, path

More

Packages that depend on go_router_aggregator