Jonny Borges
Committed by GitHub

Merge pull request #1369 from lifez/master

Compatibility with dart-lang/mockito
... ... @@ -4,10 +4,10 @@ import '../../get_core/get_core.dart';
/// overrides if you extend the class that uses it, as Dart has no final
/// methods.
/// Used in [DisposableInterface] to avoid the danger of overriding onStart.
class _InternalFinalCallback<T> {
class InternalFinalCallback<T> {
ValueUpdater<T>? _callback;
_InternalFinalCallback({ValueUpdater<T>? callback}) : _callback = callback;
InternalFinalCallback({ValueUpdater<T>? callback}) : _callback = callback;
T call() => _callback!.call();
}
... ... @@ -26,7 +26,7 @@ mixin GetLifeCycleBase {
/// It uses an internal "callable" type, to avoid any @overrides in subclases.
/// This method should be internal and is required to define the
/// lifetime cycle of the subclass.
final onStart = _InternalFinalCallback<void>();
final onStart = InternalFinalCallback<void>();
// /// The `configureLifeCycle` works as a constructor for the [GetLifeCycle]
// ///
... ... @@ -36,7 +36,7 @@ mixin GetLifeCycleBase {
// }
/// Internal callback that starts the cycle of this controller.
final onDelete = _InternalFinalCallback<void>();
final onDelete = InternalFinalCallback<void>();
/// Called immediately after the widget is allocated in memory.
/// You might use this to initialize something for the controller.
... ...
... ... @@ -81,7 +81,7 @@ mixin RxObjectMixin<T> on NotifyManager<T> {
/// values.
@override
// ignore: avoid_equals_and_hash_code_on_mutable_classes
bool operator ==(dynamic o) {
bool operator ==(Object o) {
// Todo, find a common implementation for the hashCode of different Types.
if (o is T) return value == o;
if (o is RxObjectMixin<T>) return value == o.value;
... ... @@ -337,7 +337,7 @@ class Rxn<T> extends Rx<T?> {
Rxn([T? initial]) : super(initial);
@override
dynamic toJson() {
Object toJson() {
try {
return (value as dynamic)?.toJson();
} on Exception catch (_) {
... ...