@@ -34,11 +34,14 @@ class _ExamInfoWindowState extends State<ExamInfoWindow> {
34
34
title: const Text ("考试安排" ),
35
35
leading: IconButton (
36
36
icon: const Icon (Icons .arrow_back),
37
- onPressed: () {
38
- Navigator .pop (context);
39
- },
37
+ onPressed: () => Get .back (),
40
38
),
41
39
actions: [
40
+ IconButton (
41
+ icon: const Icon (Icons .more_time),
42
+ onPressed: () =>
43
+ Get .to (() => NoArrangedInfo (list: c.toBeArranged)),
44
+ ),
42
45
IconButton (
43
46
icon: const Icon (Icons .info),
44
47
onPressed: () {
@@ -103,14 +106,39 @@ class _ExamInfoWindowState extends State<ExamInfoWindow> {
103
106
actions: < Widget > [
104
107
TextButton (
105
108
child: const Text ("确定" ),
106
- onPressed: () {
107
- Navigator .of (context).pop ();
108
- },
109
+ onPressed: () => Get .back (),
109
110
),
110
111
],
111
112
);
112
113
}
113
114
115
+ class NoArrangedInfo extends StatelessWidget {
116
+ final List <ToBeArranged > list;
117
+ const NoArrangedInfo ({super .key, required this .list});
118
+
119
+ @override
120
+ Widget build (BuildContext context) {
121
+ return Scaffold (
122
+ appBar: AppBar (
123
+ title: const Text ("目前无安排考试的科目" ),
124
+ ),
125
+ body: dataList <Card , Card >(
126
+ List .generate (
127
+ list.length,
128
+ (index) => Card (
129
+ child: ListTile (
130
+ title: Text (list[index].subject),
131
+ subtitle: Text ("编号: ${list [index ].id }\n "
132
+ "老师: ${list [index ].teacher ?? "没有数据" }" ),
133
+ ),
134
+ ),
135
+ ),
136
+ (toUse) => toUse,
137
+ ),
138
+ );
139
+ }
140
+ }
141
+
114
142
class InfoCard extends StatelessWidget {
115
143
final Subject toUse;
116
144
0 commit comments