Jonny Borges
Committed by GitHub

Add files via upload

@@ -143,6 +143,11 @@ @@ -143,6 +143,11 @@
143 ## [1.10.4] 143 ## [1.10.4]
144 -Improve Get.offAll() - predicate now is optional 144 -Improve Get.offAll() - predicate now is optional
145 145
  146 +## [1.10.5]
  147 + -Added setKey to improve modular compatibility
  148 + -Added ability to define transition duration directly when calling the new route.
  149 +
  150 +
146 151
147 152
148 153
@@ -9,7 +9,7 @@ I worked on a pull to fix it in the framework, and seeing how things work I real @@ -9,7 +9,7 @@ I worked on a pull to fix it in the framework, and seeing how things work I real
9 With that in mind, I created this library that will change the way you work with the Framework and save your life from cliche code, 9 With that in mind, I created this library that will change the way you work with the Framework and save your life from cliche code,
10 increasing your productivity, and eliminating all the bugs present in Flutter's default navigation altogether. 10 increasing your productivity, and eliminating all the bugs present in Flutter's default navigation altogether.
11 11
12 -##### If you use MODULAR, you can to use [GET MODULAR](https://pub.dev/packages/get_modular) 12 +##### If you use MODULAR, you can to use [GET MODULAR](https://pub.dev/packages/get_modular) or add on your MaterialApp this: navigatorKey: Get.addKey(Modular.navigatorKey)
13 13
14 ## How to use? 14 ## How to use?
15 15
@@ -17,7 +17,7 @@ Add this to your package's pubspec.yaml file: @@ -17,7 +17,7 @@ Add this to your package's pubspec.yaml file:
17 17
18 ``` 18 ```
19 dependencies: 19 dependencies:
20 - get: ^1.10.4 20 + get: ^1.10.5
21 ``` 21 ```
22 22
23 And import it: 23 And import it:
@@ -9,7 +9,19 @@ import 'transparent_route.dart'; @@ -9,7 +9,19 @@ import 'transparent_route.dart';
9 9
10 class Get { 10 class Get {
11 static Get _get; 11 static Get _get;
12 - static GlobalKey<NavigatorState> key = new GlobalKey<NavigatorState>(); 12 + static GlobalKey<NavigatorState> _key;
  13 +
  14 + static GlobalKey<NavigatorState> addKey(GlobalKey<NavigatorState> newKey) {
  15 + _key = newKey;
  16 + return _key;
  17 + }
  18 +
  19 + static GlobalKey<NavigatorState> get key {
  20 + if (_key == null) {
  21 + _key = GlobalKey<NavigatorState>();
  22 + }
  23 + return _key;
  24 + }
13 25
14 ///Use Get.to instead of Navigator.push, Get.off instead of Navigator.pushReplacement, 26 ///Use Get.to instead of Navigator.push, Get.off instead of Navigator.pushReplacement,
15 ///Get.offAll instead of Navigator.pushAndRemoveUntil. For named routes just add "named" 27 ///Get.offAll instead of Navigator.pushAndRemoveUntil. For named routes just add "named"
1 name: get 1 name: get
2 description: A consistent navigation library that lets you navigate between screens, open dialogs, and display snackbars easily with no context. 2 description: A consistent navigation library that lets you navigate between screens, open dialogs, and display snackbars easily with no context.
3 -version: 1.10.4 3 +version: 1.10.5
4 homepage: https://github.com/jonataslaw/get 4 homepage: https://github.com/jonataslaw/get
5 5
6 environment: 6 environment: