|
|
@@ -17,12 +17,52 @@ class EventManage extends GetView<EventManagerController> {
|
|
|
level1Title: '赛事列表',
|
|
|
level1Action: wDate(context),
|
|
|
level2Title: '用户列表',
|
|
|
- level2SubTitle: Obx(() => Text(
|
|
|
- controller.selected?.name != null
|
|
|
- ? '(${controller.selected!.name})'
|
|
|
- : '',
|
|
|
- style: const TextStyle(color: Colors.grey, fontSize: 14.22),
|
|
|
- )));
|
|
|
+ level2SubTitle: Row(
|
|
|
+ children: [
|
|
|
+ Obx(() => Text(
|
|
|
+ controller.selected?.name != null
|
|
|
+ ? '(${controller.selected!.name})'
|
|
|
+ : '',
|
|
|
+ style: const TextStyle(color: Colors.grey, fontSize: 14.22),
|
|
|
+ )),
|
|
|
+ const Spacer(),
|
|
|
+ SizedBox(
|
|
|
+ height: 27.73,
|
|
|
+ width: 260,
|
|
|
+ child: Row(
|
|
|
+ mainAxisSize: MainAxisSize.min,
|
|
|
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
+ children: [
|
|
|
+ SizedBox(
|
|
|
+ width: 70,
|
|
|
+ child: SmallButton(
|
|
|
+ isOutline: true,
|
|
|
+ color: Colors.orange,
|
|
|
+ onPressed: controller.userRestartAll,
|
|
|
+ child: const Text('一键重赛'),
|
|
|
+ )),
|
|
|
+ SizedBox(
|
|
|
+ width: 70,
|
|
|
+ child: SmallButton(
|
|
|
+ isOutline: true,
|
|
|
+ color: Colors.blue,
|
|
|
+ onPressed: controller.routeAllocAll,
|
|
|
+ child: const Text('一键分发'),
|
|
|
+ )),
|
|
|
+ SizedBox(
|
|
|
+ width: 70,
|
|
|
+ child: SmallButton(
|
|
|
+ isOutline: true,
|
|
|
+ color: Colors.green,
|
|
|
+ onPressed: controller.userStartAll,
|
|
|
+ child: const Text('一键开始'),
|
|
|
+ ))
|
|
|
+ ],
|
|
|
+ ),
|
|
|
+ ),
|
|
|
+ const SizedBox(width: 20)
|
|
|
+ ],
|
|
|
+ ));
|
|
|
}
|
|
|
|
|
|
Widget wDate(BuildContext context) {
|
|
|
@@ -168,25 +208,25 @@ class EventManage extends GetView<EventManagerController> {
|
|
|
onPressed: () => controller.userStart(one),
|
|
|
text: '开始')
|
|
|
: Text(stateStr, style: TextStyle(color: stateColor)),
|
|
|
- SizedBox(
|
|
|
- width: 51.2,
|
|
|
- height: 22.76,
|
|
|
- child: SmallButton(
|
|
|
- color: optColor,
|
|
|
- isOutline: true,
|
|
|
- onPressed: opt,
|
|
|
- child: Text(optStr),
|
|
|
- ))
|
|
|
+ button(text: optStr, color: optColor, isOutline: true, onPressed: opt)
|
|
|
]);
|
|
|
});
|
|
|
}
|
|
|
|
|
|
- Widget button({Color? color, VoidCallback? onPressed, required String text}) {
|
|
|
+ Widget button(
|
|
|
+ {Color? color,
|
|
|
+ VoidCallback? onPressed,
|
|
|
+ isOutline = false,
|
|
|
+ required String text}) {
|
|
|
return SizedBox(
|
|
|
height: 22.78,
|
|
|
width: 51.2,
|
|
|
child: SmallButton(
|
|
|
- color: Colors.blue, onPressed: onPressed, child: Text(text)));
|
|
|
+ color: color,
|
|
|
+ onPressed: onPressed,
|
|
|
+ isOutline: isOutline,
|
|
|
+ child: Text(text),
|
|
|
+ ));
|
|
|
}
|
|
|
|
|
|
Future<void> routeSelect(UserInManage user) async {
|