auto_route_library icon indicating copy to clipboard operation
auto_route_library copied to clipboard

[Feature Request] Use a list placed in a separate variable instead of manually specifying "children" parameter

Open kitsuniru opened this issue 1 year ago • 1 comments

Hi, is it possible to give us possibility to separate our children lists into other variables? Like this:

AutoRoute<void>(
              page: RouteWrapper,
              name: 'profile ',
              path: 'profile',
              children: profileRoutes, <-- separated to other variable
            )
            
 const List<AutoRoute> profileRoutes = [
  AutoRoute<void>(
    path: '',
    page: ProfilePage,
  ), ....,  ....,  ... ]

At the current moment build_runner drops with error: profileRoutes is not a class element

Main question: is it possible in that package or we should pass all routes (and shared routes too) between all our routes even if they have similar routes?

kitsuniru avatar Jul 17 '22 19:07 kitsuniru

@MindMayhem I'll take a look

Milad-Akarie avatar Jul 19 '22 11:07 Milad-Akarie

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

github-actions[bot] avatar Nov 22 '22 08:11 github-actions[bot]