stacked icon indicating copy to clipboard operation
stacked copied to clipboard

[docs]: HOw to achive this MaterialRoute(page: StartupView, initial: true, path: '/:uiD?', ), // Optional parameter route

Open vinodvishwakarmma opened this issue 1 year ago • 1 comments

Describe the missing piece of documentation

Hi,

I want to implement url like like https://exy.com/jdhdydhst where 'jdhdydhst' is uiDor id which is optional if uiDexist then load data from api using uiD if it is not exist then load without is . I have tried many ways to do this but not succussed plz help me how to setupup route

@StackedApp( routes: [ // MaterialRoute(page: StartupView), MaterialRoute( page: StartupView, initial: true, path: '/:uiD?', ), // Optional parameter route MaterialRoute(page: HomeView), // @stacked-route ],

Help me how to implement it

Thanks in advance

vinodvishwakarmma avatar Jul 08 '24 04:07 vinodvishwakarmma

You'll have to remove the initialRoute part and just use path instead.

You can also remove the ? after the optional path param

And in addition to that you can add a redirect for / to go to /[yourDefaultUid[

FilledStacks avatar Sep 04 '24 09:09 FilledStacks