88 lines
2.9 KiB
Dart
88 lines
2.9 KiB
Dart
import 'package:ef/ef.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:vbvs_app/common/util/MyUtils.dart';
|
|
import 'package:vbvs_app/controller/mh_controller/book_info_controller.dart';
|
|
|
|
class BookDateWidget extends GetView<BookInfoController> {
|
|
// final String week;
|
|
// final String date;
|
|
|
|
// const BookDateWidget({
|
|
// super.key,
|
|
// String? week,
|
|
// String? date,
|
|
// }) : this.week = week ?? '周一',
|
|
// this.date = date ?? '07/10';
|
|
|
|
int index;
|
|
BookInfoController bookInfoController;
|
|
|
|
BookDateWidget({required this.index, required this.bookInfoController}) {}
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return InkWell(onTap: () {
|
|
// if(index == controller.model.datetimes_index) {
|
|
// return;
|
|
// }
|
|
// controller.model.datetimes_index = index;
|
|
// controller.time_periodChange();
|
|
// controller.updateAll();
|
|
}, child: Obx(() {
|
|
return Container(
|
|
width: 71.5,
|
|
height: 71.5,
|
|
constraints: BoxConstraints(
|
|
minHeight: 70,
|
|
),
|
|
decoration: BoxDecoration(
|
|
// color: FlutterFlowTheme.of(context).secondaryBackground,
|
|
color: controller.model.datetimes_index == index
|
|
? stringToColor('#D3B684')
|
|
: FlutterFlowTheme.of(context).secondaryBackground,
|
|
borderRadius: BorderRadius.circular(8),
|
|
),
|
|
child: Column(
|
|
mainAxisSize: MainAxisSize.max,
|
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
|
children: [
|
|
Flexible(
|
|
child: Text(
|
|
"${bookInfoController.model.datetimes![index]?['dayName']}",
|
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
|
fontFamily: 'Readex Pro',
|
|
letterSpacing: 0,
|
|
color: controller.model.datetimes_index == index
|
|
? stringToColor('#FFFFFF')
|
|
: stringToColor('#333333'),
|
|
),
|
|
),
|
|
),
|
|
Flexible(
|
|
child: Text(
|
|
"${bookInfoController.model.datetimes![index]?['day']}",
|
|
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
|
fontFamily: 'Readex Pro',
|
|
letterSpacing: 0,
|
|
color: controller.model.datetimes_index == index
|
|
? stringToColor('#FFFFFF')
|
|
: stringToColor('#333333'),
|
|
),
|
|
),
|
|
),
|
|
Flexible(
|
|
child: Icon(
|
|
Icons.keyboard_arrow_down_rounded,
|
|
color: controller.model.datetimes_index == index
|
|
? stringToColor('#FFFFFF')
|
|
: stringToColor('#333333'),
|
|
size: 12,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}));
|
|
}
|
|
}
|