Showing
1 changed file
with
22 additions
and
0 deletions
@@ -54,6 +54,28 @@ To go to the next screen and cancel all previous routes (useful in shopping cart | @@ -54,6 +54,28 @@ To go to the next screen and cancel all previous routes (useful in shopping cart | ||
54 | Get.offAll(NextScreen(), (route) => false)); | 54 | Get.offAll(NextScreen(), (route) => false)); |
55 | ``` | 55 | ``` |
56 | 56 | ||
57 | +To navigate to the next route, and receive or update data as soon as you return from it: | ||
58 | +```dart | ||
59 | +var data = await Get.to(Payment()); | ||
60 | +``` | ||
61 | +on other screen, send a data for previous route: | ||
62 | + | ||
63 | +```dart | ||
64 | +Get.back(result: 'sucess'); | ||
65 | +``` | ||
66 | +And use it: | ||
67 | + | ||
68 | +ex: | ||
69 | +```dart | ||
70 | +if(data == 'sucess') madeAnything(); | ||
71 | +``` | ||
72 | + | ||
73 | +Others methods: | ||
74 | +Get.removeRoute // remove one route. | ||
75 | +Get.until // back repeatedly until the predicate returns true. | ||
76 | +Get.offUntil // go to next route and remove all the previous routes until the predicate returns true. | ||
77 | +Get.offNamedUntil // go to next named route and remove all the previous routes until the predicate returns true. | ||
78 | + | ||
57 | ### That's it, you've learned how to navigate between routes the default way. | 79 | ### That's it, you've learned how to navigate between routes the default way. |
58 | 80 | ||
59 | However, for people who like more organized code who want to navigate with named routes, or for Flutter_web Developers who want the url to show exactly which route is being shown, and want the page refresh not to affect the state of the routes. On your site, we give you a much more elegant and functional solution. Yeah, the default navigation doesn't fully support Flutter_web, but Get does !!!! | 81 | However, for people who like more organized code who want to navigate with named routes, or for Flutter_web Developers who want the url to show exactly which route is being shown, and want the page refresh not to affect the state of the routes. On your site, we give you a much more elegant and functional solution. Yeah, the default navigation doesn't fully support Flutter_web, but Get does !!!! |
-
Please register or login to post a comment