|
...
|
...
|
@@ -145,13 +145,8 @@ class _NoteBookChangePageState extends State<NoteBookChangePage> { |
|
|
|
if (j ==
|
|
|
|
_notebookDetailChangeModel.dateList.length - 1) {
|
|
|
|
String selectStr =
|
|
|
|
_notebookDetailChangeModel.dateList[2]['title'];
|
|
|
|
String timeNow = DateUtil.formatDate(
|
|
|
|
DateTime.now(),
|
|
|
|
);
|
|
|
|
String selectDate =
|
|
|
|
timeNow.replaceRange(5, 10, selectStr);
|
|
|
|
_calendWidget(DateUtil.getDateTime(selectDate));
|
|
|
|
_notebookDetailChangeModel.dateList[2]['title']+" 00:00:00";
|
|
|
|
_calendWidget(DateUtil.getDateTime(selectStr));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
...
|
...
|
@@ -312,7 +307,7 @@ class _NoteBookChangePageState extends State<NoteBookChangePage> { |
|
|
|
// _createDateText(day);
|
|
|
|
dateTime = day;
|
|
|
|
int dateTimeMill = day.millisecondsSinceEpoch;
|
|
|
|
String dateText = DateUtil.formatDateMs(dateTimeMill, format: 'MM-dd');
|
|
|
|
String dateText = DateUtil.formatDateMs(dateTimeMill, format: 'yyyy-MM-dd');
|
|
|
|
bool isThird = true;
|
|
|
|
for (int i = 0; i < _notebookDetailChangeModel.dateList.length; i++) {
|
|
|
|
_notebookDetailChangeModel.dateList[i]['select'] = false;
|
|
...
|
...
|
@@ -356,17 +351,13 @@ class _NoteBookChangePageState extends State<NoteBookChangePage> { |
|
|
|
InkWell(
|
|
|
|
onTap: () async {
|
|
|
|
FocusScope.of(context).requestFocus(FocusNode()); //点击空白处隐藏键盘
|
|
|
|
//当前选中 月 日string
|
|
|
|
String mdStr = '';
|
|
|
|
String ymyStr = ""; //年月日
|
|
|
|
//今天 明天 其他天
|
|
|
|
for (var item in _notebookDetailChangeModel.dateList) {
|
|
|
|
if (item['select'] == true) {
|
|
|
|
mdStr = item['title'];
|
|
|
|
ymyStr = item['title'];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
String timeNowYear =
|
|
|
|
DateUtil.formatDate(DateTime.now(), format: 'yyyy');
|
|
|
|
String ymyStr = timeNowYear + '-' + mdStr; //年月日
|
|
|
|
String timeStr = ymyStr + ' ' + "00:00:00";
|
|
|
|
int ddate = DateUtil.getDateMsByTimeStr(timeStr); //筛选日期时间戳
|
|
|
|
String ddateSolt = '';
|
|
...
|
...
|
@@ -691,18 +682,9 @@ class _NoteBookChangePageState extends State<NoteBookChangePage> { |
|
|
|
tempMndList = _notebookDetailChangeModel.dailyMap[key];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
//计算行数
|
|
|
|
|
|
|
|
int line = 0;
|
|
|
|
int count = tempMndList.length;
|
|
|
|
if (count % 3 == 0) {
|
|
|
|
line = int.parse('${count / 3}');
|
|
|
|
} else {
|
|
|
|
line = (count / 3).ceil();
|
|
|
|
}
|
|
|
|
int height = 85 + 40 + 36 * line + (line - 1) * 15;
|
|
|
|
final option = await showModalBottomSheet(
|
|
|
|
context: context,
|
|
|
|
isScrollControlled: true,
|
|
|
|
backgroundColor: Colors.white,
|
|
|
|
builder: (context) {
|
|
|
|
return StatefulBuilder(builder: (context, state) {
|
|
...
|
...
|
@@ -711,8 +693,8 @@ class _NoteBookChangePageState extends State<NoteBookChangePage> { |
|
|
|
decoration: BoxDecoration(
|
|
|
|
borderRadius:
|
|
|
|
BorderRadius.circular(ScreenUtil().setWidth(10))),
|
|
|
|
height: ScreenUtil().setWidth(height * 2),
|
|
|
|
child: Column(
|
|
|
|
mainAxisSize: MainAxisSize.min,
|
|
|
|
children: [
|
|
|
|
InkWell(
|
|
|
|
onTap: () {
|
|
...
|
...
|
@@ -741,10 +723,9 @@ class _NoteBookChangePageState extends State<NoteBookChangePage> { |
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
color: MyColours.color_353535)),
|
|
|
|
),
|
|
|
|
VEmptyView(40),
|
|
|
|
Padding(
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: ScreenUtil().setWidth(60)),
|
|
|
|
horizontal: ScreenUtil().setWidth(60),vertical: ScreenUtil().setWidth(40)),
|
|
|
|
child: GridView.builder(
|
|
|
|
padding:
|
|
|
|
EdgeInsets.only(top: ScreenUtil().setWidth(20)),
|
...
|
...
|
|