auto_route_library icon indicating copy to clipboard operation
auto_route_library copied to clipboard

Navigate Function causes clearing for path params

Open WowVir opened this issue 8 months ago • 1 comments

i have these routes

  AutoRoute(path: '/dashboard', page: HomeRouteNavigation.page,children: [


           AutoRoute(
               path: 'vendors',
               page: VendorsNavigationRoute.page,

               children: [
                 AutoRoute(path: '', page: VendorsRoute.page),
                 AutoRoute(path: ':vendor-id', page: EditVendorRoute.page, children: [

                   AutoRoute(path:'branches',page: VendorBranchesRoute.page,children:[

                     AutoRoute(path:':branch-id',page: EditBranchRoute.page,children: [
                       AutoRoute(path: 'location',page: MapLocationSelectionRoute.page)
                     ]),

                     AutoRoute(path: 'create', page: CreateBranchRoute.page,children: [
                       AutoRoute(path: 'location',page: MapLocationSelectionRoute.page)
                     ]),
                   ]),

                 ]),

               AutoRoute(path: 'create', page: CreateVendorRoute.page),
               ]),

and im trying to access vendor branches route for navigating to edit vendor route everything works fine

but when im trying to get the pathParam.inherit('vendor-id') after using appRouter.navigate(VendorBranchesRoute()) it shows me an error "Failed to parse [String] vendor-id value from null" and it also navigates me to "/dashboard/vendors/:vendor-id/branches" note that :vendor-id is not the actual id

it tried using appRouter.push .. but nothing different

WowVir avatar Dec 12 '23 14:12 WowVir

Same here!

tomasweigenast avatar Dec 29 '23 13:12 tomasweigenast