Jonny Borges
Committed by GitHub

Merge pull request #444 from Nipodemos/docs-typo-fix

fix typo of predicate and page arguments
1 -{  
2 - "configVersion": 2,  
3 - "packages": [  
4 - {  
5 - "name": "async",  
6 - "rootUri": "file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/async-2.4.2",  
7 - "packageUri": "lib/",  
8 - "languageVersion": "2.2"  
9 - },  
10 - {  
11 - "name": "boolean_selector",  
12 - "rootUri": "file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/boolean_selector-2.0.0",  
13 - "packageUri": "lib/",  
14 - "languageVersion": "2.4"  
15 - },  
16 - {  
17 - "name": "characters",  
18 - "rootUri": "file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/characters-1.0.0",  
19 - "packageUri": "lib/",  
20 - "languageVersion": "2.6"  
21 - },  
22 - {  
23 - "name": "charcode",  
24 - "rootUri": "file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/charcode-1.1.3",  
25 - "packageUri": "lib/",  
26 - "languageVersion": "2.0"  
27 - },  
28 - {  
29 - "name": "clock",  
30 - "rootUri": "file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/clock-1.0.1",  
31 - "packageUri": "lib/",  
32 - "languageVersion": "2.0"  
33 - },  
34 - {  
35 - "name": "collection",  
36 - "rootUri": "file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/collection-1.14.13",  
37 - "packageUri": "lib/",  
38 - "languageVersion": "2.3"  
39 - },  
40 - {  
41 - "name": "dio",  
42 - "rootUri": "file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/dio-3.0.9",  
43 - "packageUri": "lib/",  
44 - "languageVersion": "2.4"  
45 - },  
46 - {  
47 - "name": "fake_async",  
48 - "rootUri": "file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/fake_async-1.1.0",  
49 - "packageUri": "lib/",  
50 - "languageVersion": "2.2"  
51 - },  
52 - {  
53 - "name": "flutter",  
54 - "rootUri": "file:///opt/flutter/packages/flutter",  
55 - "packageUri": "lib/",  
56 - "languageVersion": "2.9"  
57 - },  
58 - {  
59 - "name": "flutter_test",  
60 - "rootUri": "file:///opt/flutter/packages/flutter_test",  
61 - "packageUri": "lib/",  
62 - "languageVersion": "2.2"  
63 - },  
64 - {  
65 - "name": "get",  
66 - "rootUri": "file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/get-3.2.2",  
67 - "packageUri": "lib/",  
68 - "languageVersion": "2.6"  
69 - },  
70 - {  
71 - "name": "http_parser",  
72 - "rootUri": "file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/http_parser-3.1.4",  
73 - "packageUri": "lib/",  
74 - "languageVersion": "2.3"  
75 - },  
76 - {  
77 - "name": "matcher",  
78 - "rootUri": "file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/matcher-0.12.8",  
79 - "packageUri": "lib/",  
80 - "languageVersion": "2.4"  
81 - },  
82 - {  
83 - "name": "meta",  
84 - "rootUri": "file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/meta-1.1.8",  
85 - "packageUri": "lib/",  
86 - "languageVersion": "1.12"  
87 - },  
88 - {  
89 - "name": "path",  
90 - "rootUri": "file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/path-1.7.0",  
91 - "packageUri": "lib/",  
92 - "languageVersion": "2.0"  
93 - },  
94 - {  
95 - "name": "sky_engine",  
96 - "rootUri": "file:///opt/flutter/bin/cache/pkg/sky_engine",  
97 - "packageUri": "lib/",  
98 - "languageVersion": "1.11"  
99 - },  
100 - {  
101 - "name": "source_span",  
102 - "rootUri": "file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/source_span-1.7.0",  
103 - "packageUri": "lib/",  
104 - "languageVersion": "2.6"  
105 - },  
106 - {  
107 - "name": "stack_trace",  
108 - "rootUri": "file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/stack_trace-1.9.5",  
109 - "packageUri": "lib/",  
110 - "languageVersion": "2.0"  
111 - },  
112 - {  
113 - "name": "stream_channel",  
114 - "rootUri": "file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/stream_channel-2.0.0",  
115 - "packageUri": "lib/",  
116 - "languageVersion": "2.0"  
117 - },  
118 - {  
119 - "name": "string_scanner",  
120 - "rootUri": "file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/string_scanner-1.0.5",  
121 - "packageUri": "lib/",  
122 - "languageVersion": "2.0"  
123 - },  
124 - {  
125 - "name": "term_glyph",  
126 - "rootUri": "file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/term_glyph-1.1.0",  
127 - "packageUri": "lib/",  
128 - "languageVersion": "1.8"  
129 - },  
130 - {  
131 - "name": "test_api",  
132 - "rootUri": "file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/test_api-0.2.17",  
133 - "packageUri": "lib/",  
134 - "languageVersion": "2.7"  
135 - },  
136 - {  
137 - "name": "typed_data",  
138 - "rootUri": "file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/typed_data-1.2.0",  
139 - "packageUri": "lib/",  
140 - "languageVersion": "2.4"  
141 - },  
142 - {  
143 - "name": "vector_math",  
144 - "rootUri": "file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/vector_math-2.0.8",  
145 - "packageUri": "lib/",  
146 - "languageVersion": "2.0"  
147 - },  
148 - {  
149 - "name": "get_state",  
150 - "rootUri": "../",  
151 - "packageUri": "lib/",  
152 - "languageVersion": "2.7"  
153 - }  
154 - ],  
155 - "generated": "2020-07-14T09:09:42.984811Z",  
156 - "generator": "pub",  
157 - "generatorVersion": "2.9.0-21.2.beta"  
158 -}  
1 -# Generated by pub on 2020-07-14 06:09:42.955823.  
2 -async:file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/async-2.4.2/lib/  
3 -boolean_selector:file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/boolean_selector-2.0.0/lib/  
4 -characters:file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/characters-1.0.0/lib/  
5 -charcode:file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/charcode-1.1.3/lib/  
6 -clock:file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/clock-1.0.1/lib/  
7 -collection:file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/collection-1.14.13/lib/  
8 -dio:file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/dio-3.0.9/lib/  
9 -fake_async:file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/fake_async-1.1.0/lib/  
10 -flutter:file:///opt/flutter/packages/flutter/lib/  
11 -flutter_test:file:///opt/flutter/packages/flutter_test/lib/  
12 -get:file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/get-3.2.2/lib/  
13 -http_parser:file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/http_parser-3.1.4/lib/  
14 -matcher:file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/matcher-0.12.8/lib/  
15 -meta:file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/meta-1.1.8/lib/  
16 -path:file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/path-1.7.0/lib/  
17 -sky_engine:file:///opt/flutter/bin/cache/pkg/sky_engine/lib/  
18 -source_span:file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/source_span-1.7.0/lib/  
19 -stack_trace:file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/stack_trace-1.9.5/lib/  
20 -stream_channel:file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/stream_channel-2.0.0/lib/  
21 -string_scanner:file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/string_scanner-1.0.5/lib/  
22 -term_glyph:file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/term_glyph-1.1.0/lib/  
23 -test_api:file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/test_api-0.2.17/lib/  
24 -typed_data:file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/typed_data-1.2.0/lib/  
25 -vector_math:file:///opt/flutter/.pub-cache/hosted/pub.dartlang.org/vector_math-2.0.8/lib/  
26 -get_state:lib/  
@@ -7,7 +7,7 @@ packages: @@ -7,7 +7,7 @@ packages:
7 name: async 7 name: async
8 url: "https://pub.dartlang.org" 8 url: "https://pub.dartlang.org"
9 source: hosted 9 source: hosted
10 - version: "2.4.2" 10 + version: "2.4.1"
11 boolean_selector: 11 boolean_selector:
12 dependency: transitive 12 dependency: transitive
13 description: 13 description:
@@ -120,7 +120,7 @@ packages: @@ -120,7 +120,7 @@ packages:
120 name: stack_trace 120 name: stack_trace
121 url: "https://pub.dartlang.org" 121 url: "https://pub.dartlang.org"
122 source: hosted 122 source: hosted
123 - version: "1.9.5" 123 + version: "1.9.3"
124 stream_channel: 124 stream_channel:
125 dependency: transitive 125 dependency: transitive
126 description: 126 description:
@@ -126,27 +126,31 @@ extension GetNavigation on GetInterface { @@ -126,27 +126,31 @@ extension GetNavigation on GetInterface {
126 /// as explained in documentation 126 /// as explained in documentation
127 /// 127 ///
128 /// [predicate] can be used like this: 128 /// [predicate] can be used like this:
129 - /// `Get.until(Get.currentRoute == '/home')`so when you get to home page, 129 + /// `Get.until((route) => Get.currentRoute == '/home')`so when you get to home page,
130 /// 130 ///
131 /// or also like this: 131 /// or also like this:
132 - /// `Get.until(!Get.isDialogOpen())`, to make sure the dialog is closed 132 + /// `Get.until((route) => !Get.isDialogOpen())`, to make sure the dialog is closed
133 void until(RoutePredicate predicate, {int id}) { 133 void until(RoutePredicate predicate, {int id}) {
134 // if (key.currentState.mounted) // add this if appear problems on future with route navigate 134 // if (key.currentState.mounted) // add this if appear problems on future with route navigate
135 // when widget don't mounted 135 // when widget don't mounted
136 return global(id).currentState.popUntil(predicate); 136 return global(id).currentState.popUntil(predicate);
137 } 137 }
138 138
139 - /// Push the given [page], and then pop several [pages] in the stack until 139 + /// Push the given [page], and then pop several pages in the stack until
140 /// [predicate] returns true 140 /// [predicate] returns true
141 /// 141 ///
142 /// [id] is for when you are using nested navigation, 142 /// [id] is for when you are using nested navigation,
143 /// as explained in documentation 143 /// as explained in documentation
144 /// 144 ///
  145 + /// Obs: unlike other get methods, this one you need to send a function
  146 + /// that returns the widget to the page argument, like this:
  147 + /// Get.offUntil( () => HomePage() )
  148 + ///
145 /// [predicate] can be used like this: 149 /// [predicate] can be used like this:
146 - /// `Get.until(Get.currentRoute == '/home')`so when you get to home page, 150 + /// `Get.until((route) => Get.currentRoute == '/home')`so when you get to home page,
147 /// 151 ///
148 /// or also like this: 152 /// or also like this:
149 - /// `Get.until(!Get.isDialogOpen())`, to make sure the dialog is closed 153 + /// `Get.until((route) => !Get.isDialogOpen())`, to make sure the dialog is closed
150 Future<T> offUntil<T>(Route<T> page, RoutePredicate predicate, {int id}) { 154 Future<T> offUntil<T>(Route<T> page, RoutePredicate predicate, {int id}) {
151 // if (key.currentState.mounted) // add this if appear problems on future with route navigate 155 // if (key.currentState.mounted) // add this if appear problems on future with route navigate
152 // when widget don't mounted 156 // when widget don't mounted
@@ -162,9 +166,9 @@ extension GetNavigation on GetInterface { @@ -162,9 +166,9 @@ extension GetNavigation on GetInterface {
162 /// as explained in documentation 166 /// as explained in documentation
163 /// 167 ///
164 /// [predicate] can be used like this: 168 /// [predicate] can be used like this:
165 - /// `Get.until(Get.currentRoute == '/home')`so when you get to home page, 169 + /// `Get.until((route) => Get.currentRoute == '/home')`so when you get to home page,
166 /// or also like 170 /// or also like
167 - /// `Get.until(!Get.isDialogOpen())`, to make sure the dialog is closed 171 + /// `Get.until((route) => !Get.isDialogOpen())`, to make sure the dialog is closed
168 /// 172 ///
169 /// Note: Always put a slash on the route ('/page1'), to avoid unnexpected errors 173 /// Note: Always put a slash on the route ('/page1'), to avoid unnexpected errors
170 Future<T> offNamedUntil<T>( 174 Future<T> offNamedUntil<T>(
@@ -201,13 +205,19 @@ extension GetNavigation on GetInterface { @@ -201,13 +205,19 @@ extension GetNavigation on GetInterface {
201 return global(id).currentState.removeRoute(route); 205 return global(id).currentState.removeRoute(route);
202 } 206 }
203 207
204 - /// Push a named [page] and remove all other pages from stack 208 + /// Push a named [page] and pop several pages in the stack
  209 + /// until [predicate] returns true. [predicate] is optional
205 /// 210 ///
206 /// It has the advantage of not needing context, so you can 211 /// It has the advantage of not needing context, so you can
207 /// call from your business logic. 212 /// call from your business logic.
208 /// 213 ///
209 /// You can send any type of value to the other route in the [arguments]. 214 /// You can send any type of value to the other route in the [arguments].
210 /// 215 ///
  216 + /// [predicate] can be used like this:
  217 + /// `Get.until((route) => Get.currentRoute == '/home')`so when you get to home page,
  218 + /// or also like
  219 + /// `Get.until((route) => !Get.isDialogOpen())`, to make sure the dialog is closed
  220 + ///
211 /// [id] is for when you are using nested navigation, 221 /// [id] is for when you are using nested navigation,
212 /// as explained in documentation 222 /// as explained in documentation
213 /// 223 ///
@@ -260,6 +270,9 @@ extension GetNavigation on GetInterface { @@ -260,6 +270,9 @@ extension GetNavigation on GetInterface {
260 } 270 }
261 271
262 /// Close as many routes as defined by [times] 272 /// Close as many routes as defined by [times]
  273 + ///
  274 + /// [id] is for when you are using nested navigation,
  275 + /// as explained in documentation
263 void close(int times, [int id]) { 276 void close(int times, [int id]) {
264 if ((times == null) || (times < 1)) { 277 if ((times == null) || (times < 1)) {
265 times = 1; 278 times = 1;
@@ -320,7 +333,8 @@ extension GetNavigation on GetInterface { @@ -320,7 +333,8 @@ extension GetNavigation on GetInterface {
320 transitionDuration: duration ?? defaultDurationTransition)); 333 transitionDuration: duration ?? defaultDurationTransition));
321 } 334 }
322 335
323 - /// Pop all pages in the stack and pushes a new [page] to it 336 + /// Push a [page] and pop several pages in the stack
  337 + /// until [predicate] returns true. [predicate] is optional
324 /// 338 ///
325 /// It has the advantage of not needing context, 339 /// It has the advantage of not needing context,
326 /// so you can call from your business logic 340 /// so you can call from your business logic
@@ -333,9 +347,9 @@ extension GetNavigation on GetInterface { @@ -333,9 +347,9 @@ extension GetNavigation on GetInterface {
333 /// as a [fullscreenDialog], 347 /// as a [fullscreenDialog],
334 /// 348 ///
335 /// [predicate] can be used like this: 349 /// [predicate] can be used like this:
336 - /// `Get.until(Get.currentRoute == '/home')`so when you get to home page, 350 + /// `Get.until((route) => Get.currentRoute == '/home')`so when you get to home page,
337 /// or also like 351 /// or also like
338 - /// `Get.until(!Get.isDialogOpen())`, to make sure the dialog is closed 352 + /// `Get.until((route) => !Get.isDialogOpen())`, to make sure the dialog is closed
339 /// 353 ///
340 /// [id] is for when you are using nested navigation, 354 /// [id] is for when you are using nested navigation,
341 /// as explained in documentation 355 /// as explained in documentation
@@ -7,7 +7,7 @@ packages: @@ -7,7 +7,7 @@ packages:
7 name: async 7 name: async
8 url: "https://pub.dartlang.org" 8 url: "https://pub.dartlang.org"
9 source: hosted 9 source: hosted
10 - version: "2.4.2" 10 + version: "2.4.1"
11 boolean_selector: 11 boolean_selector:
12 dependency: transitive 12 dependency: transitive
13 description: 13 description:
@@ -21,7 +21,7 @@ packages: @@ -21,7 +21,7 @@ packages:
21 name: characters 21 name: characters
22 url: "https://pub.dartlang.org" 22 url: "https://pub.dartlang.org"
23 source: hosted 23 source: hosted
24 - version: "1.1.0-nullsafety" 24 + version: "1.0.0"
25 charcode: 25 charcode:
26 dependency: transitive 26 dependency: transitive
27 description: 27 description:
@@ -42,7 +42,7 @@ packages: @@ -42,7 +42,7 @@ packages:
42 name: collection 42 name: collection
43 url: "https://pub.dartlang.org" 43 url: "https://pub.dartlang.org"
44 source: hosted 44 source: hosted
45 - version: "1.15.0-nullsafety" 45 + version: "1.14.13"
46 fake_async: 46 fake_async:
47 dependency: transitive 47 dependency: transitive
48 description: 48 description:
@@ -73,7 +73,7 @@ packages: @@ -73,7 +73,7 @@ packages:
73 name: meta 73 name: meta
74 url: "https://pub.dartlang.org" 74 url: "https://pub.dartlang.org"
75 source: hosted 75 source: hosted
76 - version: "1.3.0-nullsafety" 76 + version: "1.1.8"
77 path: 77 path:
78 dependency: transitive 78 dependency: transitive
79 description: 79 description:
@@ -99,7 +99,7 @@ packages: @@ -99,7 +99,7 @@ packages:
99 name: stack_trace 99 name: stack_trace
100 url: "https://pub.dartlang.org" 100 url: "https://pub.dartlang.org"
101 source: hosted 101 source: hosted
102 - version: "1.9.5" 102 + version: "1.9.3"
103 stream_channel: 103 stream_channel:
104 dependency: transitive 104 dependency: transitive
105 description: 105 description:
@@ -134,13 +134,13 @@ packages: @@ -134,13 +134,13 @@ packages:
134 name: typed_data 134 name: typed_data
135 url: "https://pub.dartlang.org" 135 url: "https://pub.dartlang.org"
136 source: hosted 136 source: hosted
137 - version: "1.3.0-nullsafety" 137 + version: "1.2.0"
138 vector_math: 138 vector_math:
139 dependency: transitive 139 dependency: transitive
140 description: 140 description:
141 name: vector_math 141 name: vector_math
142 url: "https://pub.dartlang.org" 142 url: "https://pub.dartlang.org"
143 source: hosted 143 source: hosted
144 - version: "2.1.0-nullsafety" 144 + version: "2.0.8"
145 sdks: 145 sdks:
146 - dart: ">=2.9.0-18.0 <2.9.0" 146 + dart: ">=2.9.0-14.0.dev <3.0.0"