Committed by
GitHub
Merge pull request #603 from roipeker/issue441
change `arguments` to dynamic (roadmap)
Showing
2 changed files
with
16 additions
and
12 deletions
| @@ -47,7 +47,7 @@ extension GetNavigation on GetInterface { | @@ -47,7 +47,7 @@ extension GetNavigation on GetInterface { | ||
| 47 | Duration duration, | 47 | Duration duration, |
| 48 | int id, | 48 | int id, |
| 49 | bool fullscreenDialog = false, | 49 | bool fullscreenDialog = false, |
| 50 | - Object arguments, | 50 | + dynamic arguments, |
| 51 | Bindings binding, | 51 | Bindings binding, |
| 52 | bool preventDuplicates = true, | 52 | bool preventDuplicates = true, |
| 53 | bool popGesture, | 53 | bool popGesture, |
| @@ -93,7 +93,7 @@ extension GetNavigation on GetInterface { | @@ -93,7 +93,7 @@ extension GetNavigation on GetInterface { | ||
| 93 | /// Note: Always put a slash on the route ('/page1'), to avoid unnexpected errors | 93 | /// Note: Always put a slash on the route ('/page1'), to avoid unnexpected errors |
| 94 | Future<T> toNamed<T>( | 94 | Future<T> toNamed<T>( |
| 95 | String page, { | 95 | String page, { |
| 96 | - Object arguments, | 96 | + dynamic arguments, |
| 97 | int id, | 97 | int id, |
| 98 | bool preventDuplicates = true, | 98 | bool preventDuplicates = true, |
| 99 | }) { | 99 | }) { |
| @@ -121,7 +121,7 @@ extension GetNavigation on GetInterface { | @@ -121,7 +121,7 @@ extension GetNavigation on GetInterface { | ||
| 121 | /// Note: Always put a slash on the route ('/page1'), to avoid unnexpected errors | 121 | /// Note: Always put a slash on the route ('/page1'), to avoid unnexpected errors |
| 122 | Future<T> offNamed<T>( | 122 | Future<T> offNamed<T>( |
| 123 | String page, { | 123 | String page, { |
| 124 | - Object arguments, | 124 | + dynamic arguments, |
| 125 | int id, | 125 | int id, |
| 126 | bool preventDuplicates = true, | 126 | bool preventDuplicates = true, |
| 127 | }) { | 127 | }) { |
| @@ -197,7 +197,7 @@ extension GetNavigation on GetInterface { | @@ -197,7 +197,7 @@ extension GetNavigation on GetInterface { | ||
| 197 | String page, | 197 | String page, |
| 198 | RoutePredicate predicate, { | 198 | RoutePredicate predicate, { |
| 199 | int id, | 199 | int id, |
| 200 | - Object arguments, | 200 | + dynamic arguments, |
| 201 | }) { | 201 | }) { |
| 202 | return global(id) | 202 | return global(id) |
| 203 | .currentState | 203 | .currentState |
| @@ -215,8 +215,12 @@ extension GetNavigation on GetInterface { | @@ -215,8 +215,12 @@ extension GetNavigation on GetInterface { | ||
| 215 | /// The `offNamed()` pop a page, and goes to the next. The | 215 | /// The `offNamed()` pop a page, and goes to the next. The |
| 216 | /// `offAndToNamed()` goes to the next page, and removes the previous one. | 216 | /// `offAndToNamed()` goes to the next page, and removes the previous one. |
| 217 | /// The route transition animation is different. | 217 | /// The route transition animation is different. |
| 218 | - Future<T> offAndToNamed<T>(String page, | ||
| 219 | - {Object arguments, int id, dynamic result}) { | 218 | + Future<T> offAndToNamed<T>( |
| 219 | + String page, { | ||
| 220 | + dynamic arguments, | ||
| 221 | + int id, | ||
| 222 | + dynamic result, | ||
| 223 | + }) { | ||
| 220 | return global(id) | 224 | return global(id) |
| 221 | .currentState | 225 | .currentState |
| 222 | .popAndPushNamed(page, arguments: arguments, result: result); | 226 | .popAndPushNamed(page, arguments: arguments, result: result); |
| @@ -255,7 +259,7 @@ extension GetNavigation on GetInterface { | @@ -255,7 +259,7 @@ extension GetNavigation on GetInterface { | ||
| 255 | Future<T> offAllNamed<T>( | 259 | Future<T> offAllNamed<T>( |
| 256 | String newRouteName, { | 260 | String newRouteName, { |
| 257 | RoutePredicate predicate, | 261 | RoutePredicate predicate, |
| 258 | - Object arguments, | 262 | + dynamic arguments, |
| 259 | int id, | 263 | int id, |
| 260 | }) { | 264 | }) { |
| 261 | return global(id).currentState.pushNamedAndRemoveUntil( | 265 | return global(id).currentState.pushNamedAndRemoveUntil( |
| @@ -353,7 +357,7 @@ extension GetNavigation on GetInterface { | @@ -353,7 +357,7 @@ extension GetNavigation on GetInterface { | ||
| 353 | Curve curve, | 357 | Curve curve, |
| 354 | bool popGesture, | 358 | bool popGesture, |
| 355 | int id, | 359 | int id, |
| 356 | - Object arguments, | 360 | + dynamic arguments, |
| 357 | Bindings binding, | 361 | Bindings binding, |
| 358 | bool fullscreenDialog = false, | 362 | bool fullscreenDialog = false, |
| 359 | bool preventDuplicates = true, | 363 | bool preventDuplicates = true, |
| @@ -413,7 +417,7 @@ extension GetNavigation on GetInterface { | @@ -413,7 +417,7 @@ extension GetNavigation on GetInterface { | ||
| 413 | bool opaque = false, | 417 | bool opaque = false, |
| 414 | bool popGesture, | 418 | bool popGesture, |
| 415 | int id, | 419 | int id, |
| 416 | - Object arguments, | 420 | + dynamic arguments, |
| 417 | Bindings binding, | 421 | Bindings binding, |
| 418 | bool fullscreenDialog = false, | 422 | bool fullscreenDialog = false, |
| 419 | Transition transition, | 423 | Transition transition, |
| @@ -968,7 +972,7 @@ extension GetNavigation on GetInterface { | @@ -968,7 +972,7 @@ extension GetNavigation on GetInterface { | ||
| 968 | } | 972 | } |
| 969 | 973 | ||
| 970 | /// give current arguments | 974 | /// give current arguments |
| 971 | - Object get arguments => routing.args; | 975 | + dynamic get arguments => routing.args; |
| 972 | 976 | ||
| 973 | /// give name from current route | 977 | /// give name from current route |
| 974 | String get currentRoute => routing.current; | 978 | String get currentRoute => routing.current; |
| @@ -9,7 +9,7 @@ import '../default_route.dart'; | @@ -9,7 +9,7 @@ import '../default_route.dart'; | ||
| 9 | class Routing { | 9 | class Routing { |
| 10 | String current; | 10 | String current; |
| 11 | String previous; | 11 | String previous; |
| 12 | - Object args; | 12 | + dynamic args; |
| 13 | String removed; | 13 | String removed; |
| 14 | Route<dynamic> route; | 14 | Route<dynamic> route; |
| 15 | bool isBack; | 15 | bool isBack; |
| @@ -48,7 +48,7 @@ class GetObserver extends NavigatorObserver { | @@ -48,7 +48,7 @@ class GetObserver extends NavigatorObserver { | ||
| 48 | bool isDialog; | 48 | bool isDialog; |
| 49 | String current; | 49 | String current; |
| 50 | String previous; | 50 | String previous; |
| 51 | - Object args; | 51 | + dynamic args; |
| 52 | 52 | ||
| 53 | // String previousArgs; | 53 | // String previousArgs; |
| 54 | String removed; | 54 | String removed; |
-
Please register or login to post a comment