Skip to content

Commit c929690

Browse files
committed
fix: week status add "loading"
1 parent f56fb55 commit c929690

File tree

4 files changed

+16
-5
lines changed

4 files changed

+16
-5
lines changed

lib/page/classtable/classtable_page.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ class _ClassTablePageState extends State<ClassTablePage> {
7373
@override
7474
void didChangeDependencies() {
7575
classTableState = ClassTableState.of(context)!;
76-
log("Classtable state inited, ${classTableState.currentWeek}");
7776
pageControl = PageController(
7877
initialPage: classTableState.controllers.chosenWeek,
7978
keepPage: true,

lib/page/classtable/classtable_state.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ class ClassTableState extends InheritedWidget {
7878
controllers = ClassTableWidgetState(
7979
chosenWeek: toShowChoiceWeek,
8080
);
81-
log("Chosen Week is ${controllers.chosenWeek}");
8281
}
8382

8483
static ClassTableState? of(BuildContext context) {

lib/page/homepage/pad_main_page.dart

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,15 @@ class PadMainPage extends StatelessWidget {
2222
return Scaffold(
2323
appBar: AppBar(
2424
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+
),
2734
),
2835
actions: [
2936
IconButton(

lib/page/homepage/phone_main_page.dart

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,13 @@ class PhoneMainPage extends StatelessWidget {
2525
backgroundColor: Theme.of(context).colorScheme.primary,
2626
title: GetBuilder<ClassTableController>(
2727
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+
: "正在加载",
2935
style: const TextStyle(color: Colors.white),
3036
),
3137
),

0 commit comments

Comments
 (0)