Skip to content

Commit cba6f31

Browse files
committed
feat: (un)choice all score
1 parent e232446 commit cba6f31

File tree

1 file changed

+53
-23
lines changed

1 file changed

+53
-23
lines changed

lib/page/score/score.dart

Lines changed: 53 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -49,30 +49,60 @@ class ScoreWindow extends StatelessWidget {
4949
builder: (c) => Visibility(
5050
visible: c.isSelectMod,
5151
child: BottomAppBar(
52-
child: Row(
53-
mainAxisAlignment: MainAxisAlignment.spaceBetween,
54-
children: [
55-
Text(
56-
c.bottomInfo,
57-
textScaleFactor: 1.2,
58-
),
59-
FloatingActionButton(
60-
elevation: 0.0,
61-
highlightElevation: 0.0,
62-
focusElevation: 0.0,
63-
disabledElevation: 0.0,
64-
onPressed: () {
65-
Navigator.of(context).push(
66-
createRoute(ScoreChoiceWindow()),
67-
);
68-
},
69-
child: const Icon(
70-
Icons.panorama_fisheye,
52+
height: 134,
53+
elevation: 5.0,
54+
child: Column(
55+
mainAxisAlignment: MainAxisAlignment.center,
56+
children: [
57+
Row(
58+
mainAxisAlignment: MainAxisAlignment.center,
59+
children: [
60+
FilledButton(
61+
onPressed: () {
62+
for (var i in c.toShow) {
63+
c.isSelected[i.mark] = true;
64+
}
65+
c.update();
66+
},
67+
child: const Text("全选"),
68+
),
69+
const SizedBox(width: 12),
70+
FilledButton(
71+
onPressed: () {
72+
for (var i in c.toShow) {
73+
c.isSelected[i.mark] = false;
74+
}
75+
c.update();
76+
},
77+
child: const Text("全不选"),
78+
)
79+
],
7180
),
72-
),
73-
],
74-
),
75-
),
81+
Row(
82+
mainAxisAlignment: MainAxisAlignment.spaceBetween,
83+
children: [
84+
Text(
85+
c.bottomInfo,
86+
textScaleFactor: 1.2,
87+
),
88+
FloatingActionButton(
89+
elevation: 0.0,
90+
highlightElevation: 0.0,
91+
focusElevation: 0.0,
92+
disabledElevation: 0.0,
93+
onPressed: () {
94+
Navigator.of(context).push(
95+
createRoute(ScoreChoiceWindow()),
96+
);
97+
},
98+
child: const Icon(
99+
Icons.panorama_fisheye,
100+
),
101+
),
102+
],
103+
),
104+
],
105+
)),
76106
),
77107
);
78108

0 commit comments

Comments
 (0)