Skip to content

Commit 1d0f9f3

Browse files
committed
UPDATE: update f_011_parttern_mvc
1 parent 17ca683 commit 1d0f9f3

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,5 @@ app.*.map.json
4141

4242
# Exceptions to above rules.
4343
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
44+
45+
pubspec.lock

f_011_pattern_mvc/lib/main.dart

+3-2
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ class HomePage extends StatelessWidget {
7979
}
8080
}
8181

82-
/// Just a Counter. V of pattern MVC
82+
/// Just a Counter Widget. V of pattern MVC
8383
class CountPointer extends StatefulWidget {
8484
const CountPointer({
8585
Key? key,
@@ -163,7 +163,7 @@ class _CountPointerState extends State<CountPointer> {
163163
// }
164164

165165
// **** 这里重新定义了Model类型
166-
166+
/// Just a Controller. C of pattern MVC
167167
class CountPointerController extends ValueNotifier<CountPointValue> {
168168
CountPointerController(super.value);
169169

@@ -199,6 +199,7 @@ class RestorableCountPointController extends RestorableChangeNotifier<CountPoint
199199
}
200200
}
201201

202+
/// Just a Model. M of pattern MVC
202203
@immutable
203204
class CountPointValue {
204205
const CountPointValue({this.count = 0});

0 commit comments

Comments
 (0)