Showing
4 changed files
with
19 additions
and
0 deletions
@@ -15,6 +15,7 @@ dependencies: | @@ -15,6 +15,7 @@ dependencies: | ||
15 | 15 | ||
16 | dev_dependencies: | 16 | dev_dependencies: |
17 | test: ">=1.0.0 <2.0.0" | 17 | test: ">=1.0.0 <2.0.0" |
18 | + test_coverage: ">=0.4.3 <1.0.0" | ||
18 | 19 | ||
19 | 20 | ||
20 | # For information on the generic Dart part of this file, see the | 21 | # For information on the generic Dart part of this file, see the |
@@ -13,6 +13,15 @@ class Mock { | @@ -13,6 +13,15 @@ class Mock { | ||
13 | class Controller {} | 13 | class Controller {} |
14 | 14 | ||
15 | class DisposableController extends GetLifeCycle { | 15 | class DisposableController extends GetLifeCycle { |
16 | + DisposableController() { | ||
17 | + onStart.callback = _onStart; | ||
18 | + } | ||
19 | + | ||
20 | + // Internal callback that starts the cycle of this controller. | ||
21 | + void _onStart() { | ||
22 | + onInit(); | ||
23 | + } | ||
24 | + | ||
16 | bool initialized = false; | 25 | bool initialized = false; |
17 | 26 | ||
18 | void onInit() async { | 27 | void onInit() async { |
-
Please register or login to post a comment