FilledStacks / flutter-tutorials

The repo contains the source code for all the tutorials on the FilledStacks Youtube channel.
MIT License
4.75k stars 1.76k forks source link

021 & 037: how to manage the onGenerateRoute #37

Closed jasonlaw closed 4 years ago

jasonlaw commented 4 years ago

Hi @FilledStacks ,

How to manage the onGenerateRoute to cater for both case 021 & 037?

021 - Completer dialog 037 - Advance url for web

image

image

FilledStacks commented 4 years ago

H @jasonlaw , I don't quite know what the problem is. It seems your missing the extension for getRoutingData that returns the RoutingData object.

jasonlaw commented 4 years ago

Sorry I was confuse before, it is not about onGenerateRoute actually.

I had followed your 021 course for Dialog Manager and I really like the idea. At the same time I am looking for a neat way to handle the navigation and I found your course 037.

It so happen that both also using the MaterialApp builder delegation, so I am wondering how to handle that for both cases.

Like in the screen shot, for Dialog Manager the builder returning the Navigator, and the other one is returning LayoutTemplate.

Thank you!

FilledStacks commented 4 years ago

oh, you wrap the child with layout manager in the builder function. or you wrap your dialog manager, it's just a widget so you can wrap it around any other widget.

Get Outlook for Androidhttps://aka.ms/ghei36


From: jasonlaw notifications@github.com Sent: Saturday, February 8, 2020 1:06:38 AM To: FilledStacks/flutter-tutorials flutter-tutorials@noreply.github.com Cc: Dane Mackier dane.mackier@outlook.com; Mention mention@noreply.github.com Subject: Re: [FilledStacks/flutter-tutorials] 021 & 037: how to manage the onGenerateRoute (#37)

Sorry I was confuse before, it is not about onGenerateRoute actually.

I had followed your 021 course for Dialog Manager and I really like the idea. At the same time I am looking for a neat way to handle the navigation and I found your course 037.

It so happen that both also using the MaterialApp builder delegation, so I am wondering how to handle that for both cases.

Like in the screen shot, for Dialog Manager the builder returning the Navigator, and the other one is returning LayoutTemplate.

Thank you!

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/FilledStacks/flutter-tutorials/issues/37?email_source=notifications&email_token=AA3M72RQNQQFH26XOG7CKU3RBXSP5A5CNFSM4KRJZNGKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELE5WPI#issuecomment-583654205, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AA3M72S3NM653F7VU77VBQ3RBXSP5ANCNFSM4KRJZNGA.

jasonlaw commented 4 years ago

You mean (based on the dialog manager screen shot above) :

DialogManager( child: LayoutTemplate( child: widget,), )

jasonlaw commented 4 years ago

To be more clear, I would like to combine both LayoutTemplate and DialogManager for my app. Thanks.

FilledStacks commented 4 years ago

That is how you would combine it. I wrap all mine in eachother. all the managers and any other widget using the builder function.

Get Outlook for Androidhttps://aka.ms/ghei36


From: jasonlaw notifications@github.com Sent: Saturday, February 8, 2020 10:12:48 AM To: FilledStacks/flutter-tutorials flutter-tutorials@noreply.github.com Cc: Dane Mackier dane.mackier@outlook.com; Mention mention@noreply.github.com Subject: Re: [FilledStacks/flutter-tutorials] 021 & 037: how to manage the onGenerateRoute (#37)

To be more clear, I would like to combine both LayoutTemplate and DialogManager for my app. Thanks.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/FilledStacks/flutter-tutorials/issues/37?email_source=notifications&email_token=AA3M72RBS3VTH3ATSUKBMULRBZSQBA5CNFSM4KRJZNGKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOELFMPTI#issuecomment-583714765, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AA3M72RCMLDMQVSOXI3GJT3RBZSQBANCNFSM4KRJZNGA.

jasonlaw commented 4 years ago

Clear now, thank you very much! :)