Skip to content

Commit 6d03513

Browse files
Add super method to onInit, onReady
1 parent 0a8983a commit 6d03513

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

lib/samples/impl/get_controller.dart

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,14 @@ class ${_fileName.pascalCase}Controller extends GetxController {
2020
2121
2222
@override
23-
void onInit() {}
23+
void onInit() {
24+
super.onInit();
25+
}
2426
2527
@override
26-
void onReady() {}
28+
void onReady() {
29+
super.onReady();
30+
}
2731
2832
@override
2933
void onClose() {}
@@ -37,9 +41,13 @@ class ${_fileName.pascalCase}Controller extends GetxController {
3741
3842
final count = 0.obs;
3943
@override
40-
void onInit() {}
44+
void onInit() {
45+
super.onInit();
46+
}
4147
@override
42-
void onReady() {}
48+
void onReady() {
49+
super.onReady();
50+
}
4351
@override
4452
void onClose() {}
4553
void increment() => count.value++;

0 commit comments

Comments
 (0)