Showing
1 changed file
with
58 additions
and
1 deletions
@@ -3,7 +3,7 @@ import 'package:get/get.dart'; | @@ -3,7 +3,7 @@ import 'package:get/get.dart'; | ||
3 | import '../../domain/adapters/repository_adapter.dart'; | 3 | import '../../domain/adapters/repository_adapter.dart'; |
4 | import '../../domain/entity/cases_model.dart'; | 4 | import '../../domain/entity/cases_model.dart'; |
5 | 5 | ||
6 | -class HomeController extends GetxController with StateMixin<CasesModel> { | 6 | +class HomeController extends SuperController<CasesModel> { |
7 | HomeController({this.homeRepository}); | 7 | HomeController({this.homeRepository}); |
8 | 8 | ||
9 | /// inject repo abstraction dependency | 9 | /// inject repo abstraction dependency |
@@ -21,4 +21,61 @@ class HomeController extends GetxController with StateMixin<CasesModel> { | @@ -21,4 +21,61 @@ class HomeController extends GetxController with StateMixin<CasesModel> { | ||
21 | change(null, status: RxStatus.error(err.toString())); | 21 | change(null, status: RxStatus.error(err.toString())); |
22 | }); | 22 | }); |
23 | } | 23 | } |
24 | + | ||
25 | + @override | ||
26 | + void onReady() { | ||
27 | + print('The build method is done. ' | ||
28 | + 'Your controller is ready to call dialogs and snackbars'); | ||
29 | + super.onReady(); | ||
30 | + } | ||
31 | + | ||
32 | + @override | ||
33 | + void onClose() { | ||
34 | + print('onClose called'); | ||
35 | + super.onClose(); | ||
36 | + } | ||
37 | + | ||
38 | + @override | ||
39 | + void didChangeMetrics() { | ||
40 | + print('the window size did change'); | ||
41 | + super.didChangeMetrics(); | ||
42 | + } | ||
43 | + | ||
44 | + @override | ||
45 | + void didChangePlatformBrightness() { | ||
46 | + print('platform change ThemeMode'); | ||
47 | + super.didChangePlatformBrightness(); | ||
48 | + } | ||
49 | + | ||
50 | + @override | ||
51 | + Future<bool> didPushRoute(String route) { | ||
52 | + print('the route $route will be open'); | ||
53 | + return super.didPushRoute(route); | ||
54 | + } | ||
55 | + | ||
56 | + @override | ||
57 | + Future<bool> didPopRoute() { | ||
58 | + print('the current route will be closed'); | ||
59 | + return super.didPopRoute(); | ||
60 | + } | ||
61 | + | ||
62 | + @override | ||
63 | + void onDetached() { | ||
64 | + print('onDetached called'); | ||
65 | + } | ||
66 | + | ||
67 | + @override | ||
68 | + void onInactive() { | ||
69 | + print('onInative called'); | ||
70 | + } | ||
71 | + | ||
72 | + @override | ||
73 | + void onPaused() { | ||
74 | + print('onPaused called'); | ||
75 | + } | ||
76 | + | ||
77 | + @override | ||
78 | + void onResumed() { | ||
79 | + print('onResumed called'); | ||
80 | + } | ||
24 | } | 81 | } |
-
Please register or login to post a comment