|
...
|
...
|
@@ -3,6 +3,7 @@ import 'dart:convert'; |
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter_picker/flutter_picker.dart';
|
|
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
|
|
import 'package:one_key/constant/constant.dart';
|
|
|
|
import 'package:one_key/pages/message/message_dialog_item.dart';
|
|
|
|
import 'package:one_key/provider/message_dialog_model.dart';
|
|
|
|
import 'package:one_key/res/colors.dart';
|
|
...
|
...
|
@@ -224,7 +225,8 @@ class DialogUtil { |
|
|
|
color: Colors.white),
|
|
|
|
),
|
|
|
|
calendarStyle: CalendarStyle(
|
|
|
|
contentPadding: const EdgeInsets.only(bottom: 4.0),
|
|
|
|
contentPadding:
|
|
|
|
EdgeInsets.only(bottom: ScreenUtil().setWidth(8)),
|
|
|
|
weekdayStyle: TextStyle(
|
|
|
|
color: MyColours.color_2bb5b7,
|
|
|
|
fontSize: ScreenUtil().setSp(32)),
|
|
...
|
...
|
@@ -239,7 +241,8 @@ class DialogUtil { |
|
|
|
return Container(
|
|
|
|
color: MyColours.color_2bb5b7,
|
|
|
|
alignment: Alignment.center,
|
|
|
|
margin: EdgeInsets.only(bottom: 20),
|
|
|
|
margin: EdgeInsets.only(
|
|
|
|
bottom: ScreenUtil().setWidth(40)),
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
vertical: ScreenUtil().setHeight(25)),
|
|
|
|
child: Text(
|
|
...
|
...
|
@@ -252,15 +255,22 @@ class DialogUtil { |
|
|
|
},
|
|
|
|
dayBuilder: (context, date, _) {
|
|
|
|
return Container(
|
|
|
|
height: 100,
|
|
|
|
height: ScreenUtil().setWidth(200),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
shape: BoxShape.circle,
|
|
|
|
// color: Colors.blue,
|
|
|
|
),
|
|
|
|
alignment: Alignment.center,
|
|
|
|
margin: const EdgeInsets.fromLTRB(6, 6, 6, 16),
|
|
|
|
padding: const EdgeInsets.only(
|
|
|
|
bottom: 4.0, left: 8.0, right: 8.0, top: 4.0),
|
|
|
|
margin: EdgeInsets.fromLTRB(
|
|
|
|
ScreenUtil().setWidth(12),
|
|
|
|
ScreenUtil().setWidth(12),
|
|
|
|
ScreenUtil().setWidth(12),
|
|
|
|
ScreenUtil().setWidth(32)),
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
bottom: ScreenUtil().setWidth(8),
|
|
|
|
left: ScreenUtil().setWidth(16),
|
|
|
|
right: ScreenUtil().setWidth(16),
|
|
|
|
top: ScreenUtil().setWidth(8)),
|
|
|
|
child: Text(
|
|
|
|
// "${_parseDateDay(date)}",
|
|
|
|
'${date.day}',
|
|
...
|
...
|
@@ -276,9 +286,16 @@ class DialogUtil { |
|
|
|
shape: BoxShape.circle,
|
|
|
|
color: MyColours.color_2bb5b7),
|
|
|
|
alignment: Alignment.center,
|
|
|
|
margin: const EdgeInsets.fromLTRB(6, 6, 6, 16),
|
|
|
|
padding: const EdgeInsets.only(
|
|
|
|
bottom: 4.0, left: 8.0, right: 8.0, top: 4.0),
|
|
|
|
margin: EdgeInsets.fromLTRB(
|
|
|
|
ScreenUtil().setWidth(12),
|
|
|
|
ScreenUtil().setWidth(12),
|
|
|
|
ScreenUtil().setWidth(12),
|
|
|
|
ScreenUtil().setWidth(32)),
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
bottom: ScreenUtil().setWidth(8),
|
|
|
|
left: ScreenUtil().setWidth(16),
|
|
|
|
right: ScreenUtil().setWidth(16),
|
|
|
|
top: ScreenUtil().setWidth(8)),
|
|
|
|
child: Text(
|
|
|
|
// "${_parseDateDay(date)}",
|
|
|
|
'${date.day}',
|
|
...
|
...
|
@@ -293,11 +310,19 @@ class DialogUtil { |
|
|
|
decoration: BoxDecoration(
|
|
|
|
shape: BoxShape.circle,
|
|
|
|
border: Border.all(
|
|
|
|
color: MyColours.color_2bb5b7, width: 1)),
|
|
|
|
color: MyColours.color_2bb5b7,
|
|
|
|
width: ScreenUtil().setWidth(2))),
|
|
|
|
alignment: Alignment.center,
|
|
|
|
margin: const EdgeInsets.fromLTRB(6, 6, 6, 16),
|
|
|
|
padding: const EdgeInsets.only(
|
|
|
|
bottom: 4.0, left: 8.0, right: 8.0, top: 4.0),
|
|
|
|
margin: EdgeInsets.fromLTRB(
|
|
|
|
ScreenUtil().setWidth(12),
|
|
|
|
ScreenUtil().setWidth(12),
|
|
|
|
ScreenUtil().setWidth(12),
|
|
|
|
ScreenUtil().setWidth(32)),
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
bottom: ScreenUtil().setWidth(8),
|
|
|
|
left: ScreenUtil().setWidth(16),
|
|
|
|
right: ScreenUtil().setWidth(16),
|
|
|
|
top: ScreenUtil().setWidth(8)),
|
|
|
|
child: Text(
|
|
|
|
// '今',
|
|
|
|
'${date.day}',
|
|
...
|
...
|
@@ -325,7 +350,7 @@ class DialogUtil { |
|
|
|
Positioned(
|
|
|
|
right: ScreenUtil().setWidth(27),
|
|
|
|
bottom: 0,
|
|
|
|
top: 5,
|
|
|
|
top: ScreenUtil().setWidth(30),
|
|
|
|
child: buildMarker(date)),
|
|
|
|
// Align(
|
|
|
|
// alignment: Alignment.bottomCenter,
|
|
...
|
...
|
@@ -398,8 +423,9 @@ class DialogUtil { |
|
|
|
// decoration:
|
|
|
|
// BoxDecoration(shape: BoxShape.circle, color: MyColours.color_2bb5b7),
|
|
|
|
alignment: Alignment.bottomCenter,
|
|
|
|
margin: const EdgeInsets.fromLTRB(6, 6, 6, 0),
|
|
|
|
padding: const EdgeInsets.only(top: 10.0),
|
|
|
|
margin: EdgeInsets.fromLTRB(ScreenUtil().setWidth(12),
|
|
|
|
ScreenUtil().setWidth(12), ScreenUtil().setWidth(12), 0),
|
|
|
|
padding: EdgeInsets.only(top: ScreenUtil().setWidth(34)),
|
|
|
|
child: Text(
|
|
|
|
"${_parseDateDay(date)}",
|
|
|
|
style: TextStyle().copyWith(
|
|
...
|
...
|
@@ -505,11 +531,16 @@ class DialogUtil { |
|
|
|
adapter: PickerDataAdapter<String>(pickerdata: data),
|
|
|
|
hideHeader: false,
|
|
|
|
cancelText: "取消",
|
|
|
|
cancelTextStyle: TextStyle(color: MyColours.color_828282, fontSize: 20),
|
|
|
|
cancelTextStyle: TextStyle(
|
|
|
|
color: MyColours.color_828282, fontSize: ScreenUtil().setSp(36)),
|
|
|
|
confirmText: "确定",
|
|
|
|
confirmTextStyle:
|
|
|
|
TextStyle(color: MyColours.color_2bb5b7, fontSize: 20),
|
|
|
|
selectedTextStyle: TextStyle(color: Colors.blue),
|
|
|
|
itemExtent: ScreenUtil().setWidth(80),
|
|
|
|
confirmTextStyle: TextStyle(
|
|
|
|
color: MyColours.color_2bb5b7, fontSize: ScreenUtil().setSp(36)),
|
|
|
|
selectedTextStyle: TextStyle(
|
|
|
|
color: MyColours.color_199095, fontSize: ScreenUtil().setSp(32)),
|
|
|
|
textStyle: TextStyle(
|
|
|
|
color: MyColours.color_353535, fontSize: ScreenUtil().setSp(32)),
|
|
|
|
onConfirm: (Picker picker, List value) {
|
|
|
|
print(value.toString());
|
|
|
|
if (valueChanged != null) {
|
...
|
...
|
|