Make InternalFinalCallback as public so that we can use mockito to mock controll…
…er that extends GetxController
Showing
1 changed file
with
4 additions
and
4 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. |
-
Please register or login to post a comment