auto_route_library
auto_route_library copied to clipboard
Route from local package. Route must have either a page or a redirect destination.
I've separated app into package
s and every package
has screens
/routes
. I create MaterialAutoRouter
and I pass route
s from local modules into MaterialAutoRoute
routes
parameter. When I run build_runner
I get error Route must have either a page or a redirect destination
. Does auto_route
support this and if yes how can I do it?
@marenovakovic were you able to find a solution for this 👀
@Melaninneal make sure you pass a widget type to your route and make sure it's imported correctly
What Im asking specifically can I define a "router"/"sub router" in a package and add/use it as a part of a router defined in my base project?
As far as my usecase goes I have admin
and customer
apps. I've separated everything into packages and screens are defined inside admin
and customer
packages that import everything from other modules. So I don't have route per package, routes are inside admin
and customer
, I generate Router
for both and I import it inside lib
. That's how I use it. I don't have more complex example for now.
I have the same issue check your imports i have changed a folder name from authViews
to AuthViews
and vs code was confused between the old and new folder naming in imports
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions