nubank / nuvigator

A powerful routing abstraction over Flutter Navigator, with nested Navigator and Deeplinks
Apache License 2.0
275 stars 33 forks source link

Update example app #42

Closed Cisneiros closed 4 years ago

Cisneiros commented 4 years ago

I've updated the example app to look more like a real app, to showcase some of Nuvigator's features. While the objective was to have different modules to make it easier for a user to know where to look in the code while using the example app (it gets confusing going from sample1/screen2 to sample2/screen1 and such), the idea is not to add too much and distract the user from what we actually want to demo, which is navigation.

I added a nested nuvigator (friend_request module) with a bloc on its wrapper, and a grouped router (composer module). Both can be reached via a route function and via deep links, including passing typed parameters via deep link (as added in v0.6.0). The nested nuvigator is able to close a flow and also get the root router from context and display a route via pushReplacement. The grouped router's main route returns data to the caller, and there are examples using this return value when calling as function and as deep link.

As a bonus, I made the app purple 💜

Feel free to leave suggestions on further improvement we can make to the example app :)

Nested nuvigator
(via function and deep link)
Grouped router
(via function and deep link)
Push replacement
nested-nuvigator grouped-router push-replacement

(Edit: there is a typo in requests on the screen recording above. Fixed it before merging.)