Showing
1 changed file
with
8 additions
and
3 deletions
| @@ -205,7 +205,8 @@ GetMaterialApp( // Before: MaterialApp( | @@ -205,7 +205,8 @@ GetMaterialApp( // Before: MaterialApp( | ||
| 205 | home: MyHome(), | 205 | home: MyHome(), |
| 206 | ) | 206 | ) |
| 207 | ``` | 207 | ``` |
| 208 | -Def | 208 | +Navigate to new screen: |
| 209 | + | ||
| 209 | Get.to(NextScreen()); | 210 | Get.to(NextScreen()); |
| 210 | ``` | 211 | ``` |
| 211 | 212 | ||
| @@ -246,7 +247,11 @@ Controller controller = Get.put(Controller()); // Rather Controller controller = | @@ -246,7 +247,11 @@ Controller controller = Get.put(Controller()); // Rather Controller controller = | ||
| 246 | ``` | 247 | ``` |
| 247 | 248 | ||
| 248 | - Note: If you are using Get's State Manager, pay more attention to the bindings api, which will make easier to connect your view to your controller. | 249 | - Note: If you are using Get's State Manager, pay more attention to the bindings api, which will make easier to connect your view to your controller. |
| 249 | -https://github.com/jonataslaw/ge | 250 | + |
| 251 | +Instead of instantiating your class within the class you are using, you are instantiating it within the Get instance, which will make it available throughout your App. | ||
| 252 | +So you can use your controller (or class Bloc) normally | ||
| 253 | + | ||
| 254 | + | ||
| 250 | **Tip:** Get dependency management is decloupled from other parts of the package, so if for example your app is already using a state manager (any one, it doesn't matter), you don't need to rewrite it all, you can use this dependency injection with no problems at all | 255 | **Tip:** Get dependency management is decloupled from other parts of the package, so if for example your app is already using a state manager (any one, it doesn't matter), you don't need to rewrite it all, you can use this dependency injection with no problems at all |
| 251 | 256 | ||
| 252 | ```dart | 257 | ```dart |
| @@ -451,7 +456,7 @@ GetMaterialApp( | @@ -451,7 +456,7 @@ GetMaterialApp( | ||
| 451 | opaqueRoute: Get.isOpaqueRouteDefault, | 456 | opaqueRoute: Get.isOpaqueRouteDefault, |
| 452 | popGesture: Get.isPopGestureEnable, | 457 | popGesture: Get.isPopGestureEnable, |
| 453 | transitionDuration: Get.defaultDurationTransition, | 458 | transitionDuration: Get.defaultDurationTransition, |
| 454 | - defaultGlobalState: Get.defaultGlobalState,https://github.com/jonataslaw/ge | 459 | + defaultGlobalState: Get.defaultGlobalState, |
| 455 | ); | 460 | ); |
| 456 | 461 | ||
| 457 | Get.config( | 462 | Get.config( |
-
Please register or login to post a comment