Showing
8 changed files
with
16 additions
and
8 deletions
| @@ -209,7 +209,6 @@ class GetInstance { | @@ -209,7 +209,6 @@ class GetInstance { | ||
| 209 | S find<S>({String tag}) { | 209 | S find<S>({String tag}) { |
| 210 | String key = _getKey(S, tag); | 210 | String key = _getKey(S, tag); |
| 211 | if (isRegistered<S>(tag: tag)) { | 211 | if (isRegistered<S>(tag: tag)) { |
| 212 | - | ||
| 213 | if (_singl[key] == null) { | 212 | if (_singl[key] == null) { |
| 214 | if (tag == null) { | 213 | if (tag == null) { |
| 215 | throw 'Class "$S" is not register'; | 214 | throw 'Class "$S" is not register'; |
| @@ -6,7 +6,6 @@ import '../rx_core/rx_impl.dart'; | @@ -6,7 +6,6 @@ import '../rx_core/rx_impl.dart'; | ||
| 6 | import '../rx_core/rx_interface.dart'; | 6 | import '../rx_core/rx_interface.dart'; |
| 7 | import '../rx_typedefs/rx_typedefs.dart'; | 7 | import '../rx_typedefs/rx_typedefs.dart'; |
| 8 | 8 | ||
| 9 | - | ||
| 10 | /// Create a list similar to `List<T>` | 9 | /// Create a list similar to `List<T>` |
| 11 | class RxList<E> implements List<E>, RxInterface<List<E>> { | 10 | class RxList<E> implements List<E>, RxInterface<List<E>> { |
| 12 | RxList([List<E> initial]) { | 11 | RxList([List<E> initial]) { |
| 1 | import 'dart:async'; | 1 | import 'dart:async'; |
| 2 | -import 'package:meta/meta.dart'; | 2 | +import 'package:flutter/foundation.dart'; |
| 3 | import '../../../../get.dart'; | 3 | import '../../../../get.dart'; |
| 4 | import '../rx_core/rx_interface.dart'; | 4 | import '../rx_core/rx_interface.dart'; |
| 5 | import '../rx_typedefs/rx_typedefs.dart'; | 5 | import '../rx_typedefs/rx_typedefs.dart'; |
| @@ -3,8 +3,6 @@ import 'package:flutter/widgets.dart'; | @@ -3,8 +3,6 @@ import 'package:flutter/widgets.dart'; | ||
| 3 | import 'package:get/src/state_manager/rx/rx_core/rx_interface.dart'; | 3 | import 'package:get/src/state_manager/rx/rx_core/rx_interface.dart'; |
| 4 | import '../rx_core/rx_impl.dart'; | 4 | import '../rx_core/rx_impl.dart'; |
| 5 | 5 | ||
| 6 | - | ||
| 7 | - | ||
| 8 | /// The simplest reactive widget in GetX. | 6 | /// The simplest reactive widget in GetX. |
| 9 | /// | 7 | /// |
| 10 | /// Just pass your Rx variable in the root scope of the callback to have it | 8 | /// Just pass your Rx variable in the root scope of the callback to have it |
| 1 | name: get | 1 | name: get |
| 2 | description: Open screens/snackbars/dialogs/bottomSheets without context, manage states and inject dependencies easily with GetX. | 2 | description: Open screens/snackbars/dialogs/bottomSheets without context, manage states and inject dependencies easily with GetX. |
| 3 | -version: 3.6.0 | 3 | +version: 3.6.2 |
| 4 | homepage: https://github.com/jonataslaw/get | 4 | homepage: https://github.com/jonataslaw/get |
| 5 | 5 | ||
| 6 | environment: | 6 | environment: |
| 1 | import 'package:flutter_test/flutter_test.dart'; | 1 | import 'package:flutter_test/flutter_test.dart'; |
| 2 | -import 'package:matcher/matcher.dart'; | ||
| 3 | import 'package:get/get.dart'; | 2 | import 'package:get/get.dart'; |
| 4 | 3 | ||
| 5 | class Mock { | 4 | class Mock { |
| @@ -19,6 +18,14 @@ class DisposableController extends DisposableInterface { | @@ -19,6 +18,14 @@ class DisposableController extends DisposableInterface { | ||
| 19 | } | 18 | } |
| 20 | } | 19 | } |
| 21 | 20 | ||
| 21 | +class TypeMatcher<T> { | ||
| 22 | + /// Creates a type matcher for the given type parameter. | ||
| 23 | + const TypeMatcher(); | ||
| 24 | + | ||
| 25 | + /// Returns true if the given object is of type `T`. | ||
| 26 | + bool check(dynamic object) => object is T; | ||
| 27 | +} | ||
| 28 | + | ||
| 22 | abstract class Service { | 29 | abstract class Service { |
| 23 | String post(); | 30 | String post(); |
| 24 | } | 31 | } |
-
Please register or login to post a comment