Phawin

Make InternalFinalCallback as public so that we can use mockito to mock controll…

…er that extends GetxController
... ... @@ -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.
... ...