File tree Expand file tree Collapse file tree 4 files changed +16
-5
lines changed Expand file tree Collapse file tree 4 files changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -73,7 +73,6 @@ class _ClassTablePageState extends State<ClassTablePage> {
73
73
@override
74
74
void didChangeDependencies () {
75
75
classTableState = ClassTableState .of (context)! ;
76
- log ("Classtable state inited, ${classTableState .currentWeek }" );
77
76
pageControl = PageController (
78
77
initialPage: classTableState.controllers.chosenWeek,
79
78
keepPage: true ,
Original file line number Diff line number Diff line change @@ -78,7 +78,6 @@ class ClassTableState extends InheritedWidget {
78
78
controllers = ClassTableWidgetState (
79
79
chosenWeek: toShowChoiceWeek,
80
80
);
81
- log ("Chosen Week is ${controllers .chosenWeek }" );
82
81
}
83
82
84
83
static ClassTableState ? of (BuildContext context) {
Original file line number Diff line number Diff line change @@ -22,8 +22,15 @@ class PadMainPage extends StatelessWidget {
22
22
return Scaffold (
23
23
appBar: AppBar (
24
24
title: GetBuilder <ClassTableController >(
25
- builder: (c) =>
26
- Text (c.isNotVacation ? "第 ${c .currentWeek + 1 } 周" : "假期中" ),
25
+ builder: (c) => Text (
26
+ c.isGet
27
+ ? c.isNotVacation
28
+ ? "第 ${c .currentWeek + 1 } 周"
29
+ : "假期中"
30
+ : c.error != null
31
+ ? "加载错误"
32
+ : "正在加载" ,
33
+ ),
27
34
),
28
35
actions: [
29
36
IconButton (
Original file line number Diff line number Diff line change @@ -25,7 +25,13 @@ class PhoneMainPage extends StatelessWidget {
25
25
backgroundColor: Theme .of (context).colorScheme.primary,
26
26
title: GetBuilder <ClassTableController >(
27
27
builder: (c) => Text (
28
- c.isNotVacation ? "第 ${c .currentWeek + 1 } 周" : "假期中" ,
28
+ c.isGet
29
+ ? c.isNotVacation
30
+ ? "第 ${c .currentWeek + 1 } 周"
31
+ : "假期中"
32
+ : c.error != null
33
+ ? "加载错误"
34
+ : "正在加载" ,
29
35
style: const TextStyle (color: Colors .white),
30
36
),
31
37
),
You can’t perform that action at this time.
0 commit comments