Committed by
GitHub
Merge pull request #1369 from lifez/master
Compatibility with dart-lang/mockito
Showing
2 changed files
with
6 additions
and
6 deletions
@@ -4,10 +4,10 @@ import '../../get_core/get_core.dart'; | @@ -4,10 +4,10 @@ import '../../get_core/get_core.dart'; | ||
4 | /// overrides if you extend the class that uses it, as Dart has no final | 4 | /// overrides if you extend the class that uses it, as Dart has no final |
5 | /// methods. | 5 | /// methods. |
6 | /// Used in [DisposableInterface] to avoid the danger of overriding onStart. | 6 | /// Used in [DisposableInterface] to avoid the danger of overriding onStart. |
7 | -class _InternalFinalCallback<T> { | 7 | +class InternalFinalCallback<T> { |
8 | ValueUpdater<T>? _callback; | 8 | ValueUpdater<T>? _callback; |
9 | 9 | ||
10 | - _InternalFinalCallback({ValueUpdater<T>? callback}) : _callback = callback; | 10 | + InternalFinalCallback({ValueUpdater<T>? callback}) : _callback = callback; |
11 | 11 | ||
12 | T call() => _callback!.call(); | 12 | T call() => _callback!.call(); |
13 | } | 13 | } |
@@ -26,7 +26,7 @@ mixin GetLifeCycleBase { | @@ -26,7 +26,7 @@ mixin GetLifeCycleBase { | ||
26 | /// It uses an internal "callable" type, to avoid any @overrides in subclases. | 26 | /// It uses an internal "callable" type, to avoid any @overrides in subclases. |
27 | /// This method should be internal and is required to define the | 27 | /// This method should be internal and is required to define the |
28 | /// lifetime cycle of the subclass. | 28 | /// lifetime cycle of the subclass. |
29 | - final onStart = _InternalFinalCallback<void>(); | 29 | + final onStart = InternalFinalCallback<void>(); |
30 | 30 | ||
31 | // /// The `configureLifeCycle` works as a constructor for the [GetLifeCycle] | 31 | // /// The `configureLifeCycle` works as a constructor for the [GetLifeCycle] |
32 | // /// | 32 | // /// |
@@ -36,7 +36,7 @@ mixin GetLifeCycleBase { | @@ -36,7 +36,7 @@ mixin GetLifeCycleBase { | ||
36 | // } | 36 | // } |
37 | 37 | ||
38 | /// Internal callback that starts the cycle of this controller. | 38 | /// Internal callback that starts the cycle of this controller. |
39 | - final onDelete = _InternalFinalCallback<void>(); | 39 | + final onDelete = InternalFinalCallback<void>(); |
40 | 40 | ||
41 | /// Called immediately after the widget is allocated in memory. | 41 | /// Called immediately after the widget is allocated in memory. |
42 | /// You might use this to initialize something for the controller. | 42 | /// You might use this to initialize something for the controller. |
@@ -81,7 +81,7 @@ mixin RxObjectMixin<T> on NotifyManager<T> { | @@ -81,7 +81,7 @@ mixin RxObjectMixin<T> on NotifyManager<T> { | ||
81 | /// values. | 81 | /// values. |
82 | @override | 82 | @override |
83 | // ignore: avoid_equals_and_hash_code_on_mutable_classes | 83 | // ignore: avoid_equals_and_hash_code_on_mutable_classes |
84 | - bool operator ==(dynamic o) { | 84 | + bool operator ==(Object o) { |
85 | // Todo, find a common implementation for the hashCode of different Types. | 85 | // Todo, find a common implementation for the hashCode of different Types. |
86 | if (o is T) return value == o; | 86 | if (o is T) return value == o; |
87 | if (o is RxObjectMixin<T>) return value == o.value; | 87 | if (o is RxObjectMixin<T>) return value == o.value; |
@@ -337,7 +337,7 @@ class Rxn<T> extends Rx<T?> { | @@ -337,7 +337,7 @@ class Rxn<T> extends Rx<T?> { | ||
337 | Rxn([T? initial]) : super(initial); | 337 | Rxn([T? initial]) : super(initial); |
338 | 338 | ||
339 | @override | 339 | @override |
340 | - dynamic toJson() { | 340 | + Object toJson() { |
341 | try { | 341 | try { |
342 | return (value as dynamic)?.toJson(); | 342 | return (value as dynamic)?.toJson(); |
343 | } on Exception catch (_) { | 343 | } on Exception catch (_) { |
-
Please register or login to post a comment