Skip to content

Commit 06a7f48

Browse files
committed
Update
1 parent 6e7f99d commit 06a7f48

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

bin/generate_screen.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,5 @@ import 'package:df_log/df_log.dart';
1717
void main(List<String> args) async {
1818
DebugLog.debugOnly = false;
1919
await runGenerateScreensApp(args);
20+
await runGenerateScreenBindingsApp([]);
2021
}

templates/msm1/controller.dart.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ final class ___SCREEN_CLASS___Controller extends T___SCREEN_CLASS___Controller {
3030
3131
___Q1___
3232
___I1___
33-
final pCounter = Pod<int>(-1)..bindWith(this);
33+
34+
// Bind the Pod to this controller so that it disposes when the controller disposes.
35+
late final pCounter = Pod<int>(-1)..bindParent(this);
3436
3537
//
3638
//
@@ -49,6 +51,18 @@ final class ___SCREEN_CLASS___Controller extends T___SCREEN_CLASS___Controller {
4951
this.pCounter.set(0);
5052
super.initController();
5153
}
54+
55+
//
56+
//
57+
//
58+
59+
@override
60+
void dispose() {
61+
// You can also dispose of Pods manually instead of the bind method
62+
// illustrated aboce.
63+
//this.pCounter.dispose();
64+
super.dispose();
65+
}
5266
}
5367
5468
// ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

0 commit comments

Comments
 (0)