棉花app新增页面
This commit is contained in:
87
lib/pages/device_control/book_date_widget.dart
Normal file
87
lib/pages/device_control/book_date_widget.dart
Normal file
@@ -0,0 +1,87 @@
|
||||
import 'package:ef/ef.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:vbvs_app/common/util/MyUtils.dart';
|
||||
import 'package:vbvs_app/controller/mh/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,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user