Nipodemos
Committed by GitHub

Merge branch 'master' into update-ptbr-translation

  1 +## [2.10.1]
  2 +- Fix broken links on pub
  3 +- Fix List empty error
  4 +
1 ## [2.10.0] 5 ## [2.10.0]
2 - Added SmartManagement, your application's memory is managed intelligently like never before! 6 - Added SmartManagement, your application's memory is managed intelligently like never before!
3 - Added Obx, a widget that knows when to rebuild a child, without needing any type. 7 - Added Obx, a widget that knows when to rebuild a child, without needing any type.
  1 +<a href="https://www.buymeacoffee.com/jonataslaw" target="_blank"><img src="https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png" align="right" alt="Buy Me A Coffee" style="height: 41px !important;width: 174px !important; box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;-webkit-box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;" > </a>
1 ![](get.png) 2 ![](get.png)
2 3
3 *Languages: [English](README.md), [Brazilian Portuguese](README.pt-br.md).* 4 *Languages: [English](README.md), [Brazilian Portuguese](README.pt-br.md).*
@@ -50,21 +51,22 @@ Flutter's conventional navigation has a lot of unnecessary boilerplate, requires @@ -50,21 +51,22 @@ Flutter's conventional navigation has a lot of unnecessary boilerplate, requires
50 This library that will change the way you work with the Framework and save your life from boilerplate, increasing your productivity, and provide you with everything that is most modern when it comes to managing states, routes and dependencies. 51 This library that will change the way you work with the Framework and save your life from boilerplate, increasing your productivity, and provide you with everything that is most modern when it comes to managing states, routes and dependencies.
51 52
52 - **[How to use?](#how-to-use)** 53 - **[How to use?](#how-to-use)**
53 -- **[Navigating without named routes](#Navigating-without-named-routes)**  
54 -- **[SnackBars](#SnackBars)**  
55 -- **[Dialogs](#Dialogs)**  
56 -- **[BottomSheets](#BottomSheets)**  
57 -- **[Simple State Manager](#Simple-State-Manager)**  
58 -- **[Reactive State Manager](#Reactive-State-Manager)**  
59 -- **[Bindings](#Bindings)**  
60 -- **[Workers](#Workers)**  
61 -- **[Navigate with named routes](#Navigate-with-named-routes)**  
62 -- **[Send data to named Routes](#Send-data-to-named-Routes)**  
63 -- **[Dynamic urls links](#Dynamic-urls-links)**  
64 -- **[Middleware](#Middleware)**  
65 -- **[Optional Global Settings](#Optional-Global-Settings)**  
66 -- **[Other Advanced APIs and Manual configurations](#Other-Advanced-APIs-and-Manual-configurations)**  
67 -- **[Nested Navigators](#Nested-Navigators)** 54 +- **[Navigating without named routes](#navigating-without-named-routes)**
  55 +- **[SnackBars](#snackBars)**
  56 +- **[Dialogs](#dialogs)**
  57 +- **[BottomSheets](#bottomsheets)**
  58 +- **[Simple State Manager](#simple-state-manager)**
  59 +- **[Reactive State Manager](#reactive-state-manager)**
  60 +- **[Bindings](#bindings)**
  61 +- **[Workers](#workers)**
  62 +- **[Navigate with named routes](#navigate-with-named-routes)**
  63 +- **[Send data to named Routes](#send-data-to-named-Routes)**
  64 +- **[Dynamic urls links](#dynamic-urls-links)**
  65 +- **[Middleware](#middleware)**
  66 +- **[Optional Global Settings](#optional-global-settings)**
  67 +- **[Nested Navigators](#nested-navigators)**
  68 +- **[Other Advanced APIs and Manual configurations](#other-advanced-apis-and-manual-configurations)**
  69 +
68 70
69 71
70 #### You can contribute to the project in multiple ways: 72 #### You can contribute to the project in multiple ways:
@@ -1026,7 +1028,6 @@ Get.config( @@ -1026,7 +1028,6 @@ Get.config(
1026 ) 1028 )
1027 ``` 1029 ```
1028 1030
1029 -  
1030 ### Other Advanced APIs and Manual configurations 1031 ### Other Advanced APIs and Manual configurations
1031 GetMaterialApp configures everything for you, but if you want to configure Get Manually using advanced APIs. 1032 GetMaterialApp configures everything for you, but if you want to configure Get Manually using advanced APIs.
1032 1033
@@ -31,6 +31,7 @@ class GetRouteBase<T> extends PageRoute<T> { @@ -31,6 +31,7 @@ class GetRouteBase<T> extends PageRoute<T> {
31 this.alignment, 31 this.alignment,
32 this.parameter, 32 this.parameter,
33 this.binding, 33 this.binding,
  34 + this.bindings,
34 this.opaque = true, 35 this.opaque = true,
35 this.transitionDuration = const Duration(milliseconds: 400), 36 this.transitionDuration = const Duration(milliseconds: 400),
36 this.popGesture, 37 this.popGesture,
@@ -46,6 +47,9 @@ class GetRouteBase<T> extends PageRoute<T> { @@ -46,6 +47,9 @@ class GetRouteBase<T> extends PageRoute<T> {
46 if (binding != null) { 47 if (binding != null) {
47 binding.dependencies(); 48 binding.dependencies();
48 } 49 }
  50 + if (bindings != null) {
  51 + bindings.forEach((element) => element.dependencies());
  52 + }
49 } 53 }
50 54
51 /// Builds the primary contents of the route. 55 /// Builds the primary contents of the route.
@@ -55,6 +59,8 @@ class GetRouteBase<T> extends PageRoute<T> { @@ -55,6 +59,8 @@ class GetRouteBase<T> extends PageRoute<T> {
55 59
56 final Bindings binding; 60 final Bindings binding;
57 61
  62 + final List<Bindings> bindings;
  63 +
58 // final Duration duration; 64 // final Duration duration;
59 65
60 final Map<String, String> parameter; 66 final Map<String, String> parameter;
@@ -13,6 +13,7 @@ class GetRoute { @@ -13,6 +13,7 @@ class GetRoute {
13 final bool maintainState; 13 final bool maintainState;
14 final bool opaque; 14 final bool opaque;
15 final Bindings binding; 15 final Bindings binding;
  16 + final List<Bindings> bindings;
16 final Widget customTransition; 17 final Widget customTransition;
17 final Duration transitionDuration; 18 final Duration transitionDuration;
18 final bool fullscreenDialog; 19 final bool fullscreenDialog;
@@ -30,6 +31,7 @@ class GetRoute { @@ -30,6 +31,7 @@ class GetRoute {
30 this.transitionDuration = const Duration(milliseconds: 400), 31 this.transitionDuration = const Duration(milliseconds: 400),
31 this.popGesture, 32 this.popGesture,
32 this.binding, 33 this.binding,
  34 + this.bindings,
33 this.transition, 35 this.transition,
34 this.customTransition, 36 this.customTransition,
35 this.fullscreenDialog = false, 37 this.fullscreenDialog = false,
@@ -78,7 +78,6 @@ class _GetXState<T extends RxController> extends State<GetX<T>> { @@ -78,7 +78,6 @@ class _GetXState<T extends RxController> extends State<GetX<T>> {
78 78
79 if (isCreator || widget.assignId) { 79 if (isCreator || widget.assignId) {
80 if (widget.autoRemove && Get.isRegistred<T>()) { 80 if (widget.autoRemove && Get.isRegistred<T>()) {
81 - print("DISPOSEEER CHAMADOOO");  
82 // controller.onClose(); 81 // controller.onClose();
83 Get.delete<T>(); 82 Get.delete<T>();
84 } 83 }
@@ -175,7 +175,7 @@ class ListX<E> extends Iterable<E> implements RxInterface<E> { @@ -175,7 +175,7 @@ class ListX<E> extends Iterable<E> implements RxInterface<E> {
175 175
176 void addAll(List<E> item) { 176 void addAll(List<E> item) {
177 _list.addAll(item); 177 _list.addAll(item);
178 - subject.add(Change<E>.insert(item: _list.last, pos: _list.length - 1)); 178 + subject.add(Change<E>.insert(item: _list, pos: _list.length - 1));
179 } 179 }
180 180
181 /// Adds only if [item] is not null. 181 /// Adds only if [item] is not null.
@@ -183,6 +183,11 @@ class ListX<E> extends Iterable<E> implements RxInterface<E> { @@ -183,6 +183,11 @@ class ListX<E> extends Iterable<E> implements RxInterface<E> {
183 if (item != null) add(item); 183 if (item != null) add(item);
184 } 184 }
185 185
  186 + /// Adds only if [item] is not null.
  187 + void addAllNonNull(Iterable<E> item) {
  188 + if (item != null) addAll(item);
  189 + }
  190 +
186 void insert(int index, E item) { 191 void insert(int index, E item) {
187 _list.insert(index, item); 192 _list.insert(index, item);
188 subject.add(Change<E>.insert(item: item, pos: index)); 193 subject.add(Change<E>.insert(item: item, pos: index));
@@ -591,7 +596,7 @@ extension MapExtension on Map { @@ -591,7 +596,7 @@ extension MapExtension on Map {
591 extension ListExtension<E> on List<E> { 596 extension ListExtension<E> on List<E> {
592 ListX<E> get obs { 597 ListX<E> get obs {
593 if (this != null) 598 if (this != null)
594 - return ListX<E>([])..assignAll(this); 599 + return ListX<E>([])..addAllNonNull(this);
595 else 600 else
596 return ListX<E>(null); 601 return ListX<E>(null);
597 } 602 }
@@ -5,7 +5,7 @@ class Change<T> { @@ -5,7 +5,7 @@ class Change<T> {
5 /// Value after change 5 /// Value after change
6 final T $new; 6 final T $new;
7 7
8 - final T item; 8 + final item;
9 9
10 final ListChangeOp op; 10 final ListChangeOp op;
11 11
1 name: get 1 name: get
2 description: Open screens/snackbars/dialogs/bottomSheets without context, manage states and inject dependencies easily with Get. 2 description: Open screens/snackbars/dialogs/bottomSheets without context, manage states and inject dependencies easily with Get.
3 -version: 2.10.0 3 +version: 2.10.1
4 homepage: https://github.com/jonataslaw/get 4 homepage: https://github.com/jonataslaw/get
5 5
6 environment: 6 environment:
@@ -44,7 +44,7 @@ void main() { @@ -44,7 +44,7 @@ void main() {
44 expect(find.text("Double: 0.0"), findsOneWidget); 44 expect(find.text("Double: 0.0"), findsOneWidget);
45 expect(find.text("String: string"), findsOneWidget); 45 expect(find.text("String: string"), findsOneWidget);
46 expect(find.text("Bool: true"), findsOneWidget); 46 expect(find.text("Bool: true"), findsOneWidget);
47 - expect(find.text("List: 1"), findsOneWidget); 47 + expect(find.text("List: 0"), findsOneWidget);
48 expect(find.text("Map: 0"), findsOneWidget); 48 expect(find.text("Map: 0"), findsOneWidget);
49 49
50 Controller.to.increment(); 50 Controller.to.increment();
@@ -67,7 +67,7 @@ class Controller extends RxController { @@ -67,7 +67,7 @@ class Controller extends RxController {
67 var counter = 0.obs; 67 var counter = 0.obs;
68 var doubleNum = 0.0.obs; 68 var doubleNum = 0.0.obs;
69 var string = "string".obs; 69 var string = "string".obs;
70 - var list = [0].obs; 70 + var list = [].obs;
71 var map = {}.obs; 71 var map = {}.obs;
72 var boolean = true.obs; 72 var boolean = true.obs;
73 73