Jonny Borges
Committed by GitHub

Prevent onReady exceptions

  1 +## [2.12.4]
  2 +- Prevent exceptions on onReady with nullables
  3 +
  4 +## [2.12.3]
  5 +- Fix List lenght == null
  6 +
1 ## [2.12.2] 7 ## [2.12.2]
2 - Fix Workers 8 - Fix Workers
3 9
@@ -361,12 +361,11 @@ class ListX<E> extends Iterable<E> implements RxInterface<E> { @@ -361,12 +361,11 @@ class ListX<E> extends Iterable<E> implements RxInterface<E> {
361 addAll(items); 361 addAll(items);
362 } 362 }
363 363
364 - List<E> _value;  
365 List<E> get value { 364 List<E> get value {
366 if (getObs != null) { 365 if (getObs != null) {
367 getObs.addListener(subject.stream); 366 getObs.addListener(subject.stream);
368 } 367 }
369 - return _value; 368 + return _list;
370 } 369 }
371 370
372 String get string => value.toString(); 371 String get string => value.toString();
@@ -381,8 +380,8 @@ class ListX<E> extends Iterable<E> implements RxInterface<E> { @@ -381,8 +380,8 @@ class ListX<E> extends Iterable<E> implements RxInterface<E> {
381 } 380 }
382 381
383 set value(Iterable<E> val) { 382 set value(Iterable<E> val) {
384 - if (_value == val) return;  
385 - _value = val; 383 + if (_list == val) return;
  384 + _list = val;
386 subject.add(null); 385 subject.add(null);
387 } 386 }
388 387
@@ -41,7 +41,7 @@ abstract class DisposableInterface { @@ -41,7 +41,7 @@ abstract class DisposableInterface {
41 /// Do not overwrite this method. 41 /// Do not overwrite this method.
42 void onStart() { 42 void onStart() {
43 onInit(); 43 onInit();
44 - SchedulerBinding.instance.addPostFrameCallback((_) => onReady()); 44 + SchedulerBinding.instance?.addPostFrameCallback((_) => onReady());
45 } 45 }
46 46
47 /// Called Called immediately after the widget is allocated in memory. 47 /// Called Called immediately after the widget is allocated in memory.
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.12.2 3 +version: 2.12.4
4 homepage: https://github.com/jonataslaw/get 4 homepage: https://github.com/jonataslaw/get
5 5
6 environment: 6 environment: