Nipodemos
Committed by GitHub

Merge branch 'master' into update-ptbr-translation

## [2.10.1]
- Fix broken links on pub
- Fix List empty error
## [2.10.0]
- Added SmartManagement, your application's memory is managed intelligently like never before!
- Added Obx, a widget that knows when to rebuild a child, without needing any type.
... ...
<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>
![](get.png)
*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
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.
- **[How to use?](#how-to-use)**
- **[Navigating without named routes](#Navigating-without-named-routes)**
- **[SnackBars](#SnackBars)**
- **[Dialogs](#Dialogs)**
- **[BottomSheets](#BottomSheets)**
- **[Simple State Manager](#Simple-State-Manager)**
- **[Reactive State Manager](#Reactive-State-Manager)**
- **[Bindings](#Bindings)**
- **[Workers](#Workers)**
- **[Navigate with named routes](#Navigate-with-named-routes)**
- **[Send data to named Routes](#Send-data-to-named-Routes)**
- **[Dynamic urls links](#Dynamic-urls-links)**
- **[Middleware](#Middleware)**
- **[Optional Global Settings](#Optional-Global-Settings)**
- **[Other Advanced APIs and Manual configurations](#Other-Advanced-APIs-and-Manual-configurations)**
- **[Nested Navigators](#Nested-Navigators)**
- **[Navigating without named routes](#navigating-without-named-routes)**
- **[SnackBars](#snackBars)**
- **[Dialogs](#dialogs)**
- **[BottomSheets](#bottomsheets)**
- **[Simple State Manager](#simple-state-manager)**
- **[Reactive State Manager](#reactive-state-manager)**
- **[Bindings](#bindings)**
- **[Workers](#workers)**
- **[Navigate with named routes](#navigate-with-named-routes)**
- **[Send data to named Routes](#send-data-to-named-Routes)**
- **[Dynamic urls links](#dynamic-urls-links)**
- **[Middleware](#middleware)**
- **[Optional Global Settings](#optional-global-settings)**
- **[Nested Navigators](#nested-navigators)**
- **[Other Advanced APIs and Manual configurations](#other-advanced-apis-and-manual-configurations)**
#### You can contribute to the project in multiple ways:
... ... @@ -1026,7 +1028,6 @@ Get.config(
)
```
### Other Advanced APIs and Manual configurations
GetMaterialApp configures everything for you, but if you want to configure Get Manually using advanced APIs.
... ...
... ... @@ -31,6 +31,7 @@ class GetRouteBase<T> extends PageRoute<T> {
this.alignment,
this.parameter,
this.binding,
this.bindings,
this.opaque = true,
this.transitionDuration = const Duration(milliseconds: 400),
this.popGesture,
... ... @@ -46,6 +47,9 @@ class GetRouteBase<T> extends PageRoute<T> {
if (binding != null) {
binding.dependencies();
}
if (bindings != null) {
bindings.forEach((element) => element.dependencies());
}
}
/// Builds the primary contents of the route.
... ... @@ -55,6 +59,8 @@ class GetRouteBase<T> extends PageRoute<T> {
final Bindings binding;
final List<Bindings> bindings;
// final Duration duration;
final Map<String, String> parameter;
... ...
... ... @@ -13,6 +13,7 @@ class GetRoute {
final bool maintainState;
final bool opaque;
final Bindings binding;
final List<Bindings> bindings;
final Widget customTransition;
final Duration transitionDuration;
final bool fullscreenDialog;
... ... @@ -30,6 +31,7 @@ class GetRoute {
this.transitionDuration = const Duration(milliseconds: 400),
this.popGesture,
this.binding,
this.bindings,
this.transition,
this.customTransition,
this.fullscreenDialog = false,
... ...
... ... @@ -78,7 +78,6 @@ class _GetXState<T extends RxController> extends State<GetX<T>> {
if (isCreator || widget.assignId) {
if (widget.autoRemove && Get.isRegistred<T>()) {
print("DISPOSEEER CHAMADOOO");
// controller.onClose();
Get.delete<T>();
}
... ...
... ... @@ -175,7 +175,7 @@ class ListX<E> extends Iterable<E> implements RxInterface<E> {
void addAll(List<E> item) {
_list.addAll(item);
subject.add(Change<E>.insert(item: _list.last, pos: _list.length - 1));
subject.add(Change<E>.insert(item: _list, pos: _list.length - 1));
}
/// Adds only if [item] is not null.
... ... @@ -183,6 +183,11 @@ class ListX<E> extends Iterable<E> implements RxInterface<E> {
if (item != null) add(item);
}
/// Adds only if [item] is not null.
void addAllNonNull(Iterable<E> item) {
if (item != null) addAll(item);
}
void insert(int index, E item) {
_list.insert(index, item);
subject.add(Change<E>.insert(item: item, pos: index));
... ... @@ -591,7 +596,7 @@ extension MapExtension on Map {
extension ListExtension<E> on List<E> {
ListX<E> get obs {
if (this != null)
return ListX<E>([])..assignAll(this);
return ListX<E>([])..addAllNonNull(this);
else
return ListX<E>(null);
}
... ...
... ... @@ -5,7 +5,7 @@ class Change<T> {
/// Value after change
final T $new;
final T item;
final item;
final ListChangeOp op;
... ...
name: get
description: Open screens/snackbars/dialogs/bottomSheets without context, manage states and inject dependencies easily with Get.
version: 2.10.0
version: 2.10.1
homepage: https://github.com/jonataslaw/get
environment:
... ...
... ... @@ -44,7 +44,7 @@ void main() {
expect(find.text("Double: 0.0"), findsOneWidget);
expect(find.text("String: string"), findsOneWidget);
expect(find.text("Bool: true"), findsOneWidget);
expect(find.text("List: 1"), findsOneWidget);
expect(find.text("List: 0"), findsOneWidget);
expect(find.text("Map: 0"), findsOneWidget);
Controller.to.increment();
... ... @@ -67,7 +67,7 @@ class Controller extends RxController {
var counter = 0.obs;
var doubleNum = 0.0.obs;
var string = "string".obs;
var list = [0].obs;
var list = [].obs;
var map = {}.obs;
var boolean = true.obs;
... ...