Generates strongly typed route helpers for go_router
open sourceBSD-3-Clausefree
go_router_builder is a code generator from the Flutter team for go_router. You declare each route as a class with typed path and query parameters, and build_runner generates the route tree and type-safe go, push and location helpers, so a wrong or missing parameter is a compile error instead of a crash at run time. It also handles redirects, shell routes, custom transitions and return values, and warns at build time about routes that resolve to the same URL. Part of the flutter/packages monorepo, published on pub.dev by flutter.dev under the BSD 3-Clause licence.
Problems it solves
- catch wrong route parameters in my Flutter app at compile time instead of at run time
- stop writing string paths and parsing parameters by hand for every go_router route
- navigate between Flutter screens with typed arguments
Features
- Generates go_router routes and typed navigation helpers with build_runner
- Typed path, query and extra parameters checked at compile time
- Route-level redirects, shell routes and custom transitions
- Build-time warning for routes that resolve to the same URL
Alternatives
The same job
These do what go_router_builder does.
- go_router A declarative, URL-based router for Flutter
