|
...
|
...
|
@@ -145,12 +145,13 @@ class DialogUtil { |
|
|
|
messageModel.showMessageDialog=false;
|
|
|
|
}
|
|
|
|
|
|
|
|
//显示消息弹框
|
|
|
|
//显示日历弹框
|
|
|
|
static Future<DateTime> showCalendarDialog(BuildContext context,DateTime selectDateTime) {
|
|
|
|
CalendarController _calendarController = CalendarController();
|
|
|
|
Map<DateTime, List> _events = {};
|
|
|
|
return showModalBottomSheet<DateTime>(
|
|
|
|
context: context,
|
|
|
|
isScrollControlled:true,
|
|
|
|
builder: (BuildContext context) {
|
|
|
|
BuildContext dialogContext = context;
|
|
|
|
Widget widget = StatefulBuilder(builder: (context, _setState) {
|
|
...
|
...
|
@@ -173,6 +174,7 @@ class DialogUtil { |
|
|
|
headerStyle: HeaderStyle(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: MyColours.color_2bb5b7),
|
|
|
|
headerPadding: EdgeInsets.zero,
|
|
|
|
formatButtonVisible: false,
|
|
|
|
centerHeaderTitle: true,
|
|
|
|
titleTextBuilder: (dateTime, _) {
|
|
...
|
...
|
@@ -271,34 +273,40 @@ class DialogUtil { |
|
|
|
),
|
|
|
|
),
|
|
|
|
Positioned(
|
|
|
|
bottom: ScreenUtil().setHeight(7),
|
|
|
|
right: ScreenUtil().setWidth(62),
|
|
|
|
child: GestureDetector(
|
|
|
|
onTap: () {
|
|
|
|
_calendarController.setSelectedDay(DateTime.now());
|
|
|
|
_setState(() {});
|
|
|
|
},
|
|
|
|
child: Container(
|
|
|
|
child: ClipOval(
|
|
|
|
child: Container(
|
|
|
|
width: ScreenUtil().setWidth(95),
|
|
|
|
height: ScreenUtil().setWidth(95),
|
|
|
|
alignment: Alignment.center,
|
|
|
|
color: MyColours.color_2bb5b7,
|
|
|
|
child: Text(
|
|
|
|
"回到\n今天",
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
fontSize: ScreenUtil().setSp(26)),
|
|
|
|
),
|
|
|
|
)),
|
|
|
|
bottom: ScreenUtil().setHeight(7),
|
|
|
|
child: Container(
|
|
|
|
child: GestureDetector(
|
|
|
|
onTap: () {
|
|
|
|
_calendarController.setSelectedDay(DateTime.now());
|
|
|
|
_setState(() {});
|
|
|
|
},
|
|
|
|
child: Container(
|
|
|
|
child: ClipOval(
|
|
|
|
child: Container(
|
|
|
|
width: ScreenUtil().setWidth(95),
|
|
|
|
height: ScreenUtil().setWidth(95),
|
|
|
|
alignment: Alignment.center,
|
|
|
|
color: MyColours.color_2bb5b7,
|
|
|
|
child: Text(
|
|
|
|
"回到\n今天",
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
fontSize: ScreenUtil().setSp(26)),
|
|
|
|
),
|
|
|
|
)),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
)
|
|
|
|
],
|
|
|
|
);
|
|
|
|
});
|
|
|
|
return widget;
|
|
|
|
return SizedBox(
|
|
|
|
width: double.infinity,
|
|
|
|
height: ScreenUtil().setWidth(935),
|
|
|
|
child: widget,
|
|
|
|
);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
...
|
...
|
|