|
...
|
...
|
@@ -1304,7 +1304,7 @@ class DialogUtil { |
|
|
|
color: MyColours.color_ffffff,
|
|
|
|
child: Column(
|
|
|
|
children: <Widget>[
|
|
|
|
TableCalendar(
|
|
|
|
TableCalendar(
|
|
|
|
// rowHeight: ScreenUtil().setWidth(100),
|
|
|
|
calendarController: _calendarController,
|
|
|
|
initialSelectedDay: selectDateTime,
|
|
...
|
...
|
@@ -1536,10 +1536,10 @@ class DialogUtil { |
|
|
|
// bottom: 0,
|
|
|
|
// top: ScreenUtil().setWidth(30),
|
|
|
|
// child: buildMarker(date)),
|
|
|
|
// Align(
|
|
|
|
// alignment: Alignment.bottomCenter,
|
|
|
|
// child: buildMarker(date),
|
|
|
|
// )
|
|
|
|
// Align(
|
|
|
|
// alignment: Alignment.bottomCenter,
|
|
|
|
// child: buildMarker(date),
|
|
|
|
// )
|
|
|
|
// );
|
|
|
|
// }
|
|
|
|
|
|
...
|
...
|
@@ -2339,6 +2339,330 @@ class DialogUtil { |
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
static Future festivalAlertDialog(
|
|
|
|
BuildContext context, String name, double height,
|
|
|
|
{CustomCallBack rCallback, double fontSize = 28}) async {
|
|
|
|
final action = await showDialog(
|
|
|
|
context: context,
|
|
|
|
barrierDismissible: true,
|
|
|
|
builder: (BuildContext context) {
|
|
|
|
TextEditingController controller = TextEditingController();
|
|
|
|
controller.text = name;
|
|
|
|
return Scaffold(
|
|
|
|
backgroundColor: Colors.transparent,
|
|
|
|
body: Center(
|
|
|
|
child: Container(
|
|
|
|
padding:
|
|
|
|
EdgeInsets.symmetric(horizontal: ScreenUtil().setWidth(72)),
|
|
|
|
height: ScreenUtil().setWidth(height),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
borderRadius:
|
|
|
|
BorderRadius.circular(ScreenUtil().setWidth(30))),
|
|
|
|
child: Card(
|
|
|
|
shape: RoundedRectangleBorder(
|
|
|
|
borderRadius: BorderRadius.all(
|
|
|
|
Radius.circular(ScreenUtil().setWidth(30)))), //设置圆角
|
|
|
|
child: Padding(
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: ScreenUtil().setWidth(40)),
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
// VEmptyView(60),
|
|
|
|
Stack(children: [
|
|
|
|
Container(
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
top: ScreenUtil().setWidth(60),
|
|
|
|
bottom: ScreenUtil().setWidth(50)),
|
|
|
|
// color: Colors.red,
|
|
|
|
alignment: Alignment.center,
|
|
|
|
child: Text('纪念日名称',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(fontSize),
|
|
|
|
color: MyColours.color_353535)),
|
|
|
|
),
|
|
|
|
Positioned(
|
|
|
|
right: 0,
|
|
|
|
top: ScreenUtil().setWidth(36),
|
|
|
|
child: Text('删除',
|
|
|
|
style: TextStyle(
|
|
|
|
decoration: TextDecoration.underline,
|
|
|
|
fontSize: ScreenUtil().setSp(26),
|
|
|
|
color: MyColours.color_199095)))
|
|
|
|
]),
|
|
|
|
|
|
|
|
Container(
|
|
|
|
height: ScreenUtil().setWidth(40),
|
|
|
|
// color: Colors.red,
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: ScreenUtil().setWidth(68)),
|
|
|
|
alignment: Alignment.center,
|
|
|
|
child: Material(
|
|
|
|
color: Colors.transparent,
|
|
|
|
child: TextField(
|
|
|
|
controller: controller,
|
|
|
|
maxLines: 1,
|
|
|
|
|
|
|
|
// //光标颜色
|
|
|
|
// cursorColor:
|
|
|
|
// widget.isSelect ? Colors.white : MyColours.color_199095,
|
|
|
|
// //输入文本的样式
|
|
|
|
// inputFormatters: lenghtLimit
|
|
|
|
// ? [
|
|
|
|
// LengthLimitingTextInputFormatter(10),
|
|
|
|
// ]
|
|
|
|
// : [],
|
|
|
|
textAlignVertical:
|
|
|
|
TextAlignVertical.bottom,
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(26),
|
|
|
|
),
|
|
|
|
decoration: InputDecoration(
|
|
|
|
border: OutlineInputBorder(
|
|
|
|
borderSide: BorderSide.none),
|
|
|
|
hintText: '例:本人生日',
|
|
|
|
hintStyle: TextStyle(
|
|
|
|
color: MyColours.color_999999,
|
|
|
|
fontSize: ScreenUtil().setSp(26),
|
|
|
|
),
|
|
|
|
enabledBorder: new UnderlineInputBorder(
|
|
|
|
borderSide: BorderSide.none,
|
|
|
|
),
|
|
|
|
focusedBorder: new UnderlineInputBorder(
|
|
|
|
borderSide: BorderSide.none,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
onChanged: (value) {
|
|
|
|
name = value;
|
|
|
|
},
|
|
|
|
onEditingComplete: () {
|
|
|
|
FocusScope.of(context).requestFocus(
|
|
|
|
FocusNode()); //点击空白处隐藏键盘
|
|
|
|
},
|
|
|
|
keyboardType: TextInputType.text))),
|
|
|
|
// VEmptyView(28),
|
|
|
|
MyDivider(ScreenUtil().setWidth(280 * 2),
|
|
|
|
ScreenUtil().setWidth(2),
|
|
|
|
color: MyColours.color_efefef),
|
|
|
|
Container(
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
top: ScreenUtil().setWidth(40),
|
|
|
|
bottom: ScreenUtil().setWidth(50)),
|
|
|
|
// color: Colors.red,
|
|
|
|
alignment: Alignment.center,
|
|
|
|
child: Text('纪念日日期',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(fontSize),
|
|
|
|
color: MyColours.color_353535)),
|
|
|
|
),
|
|
|
|
Row(
|
|
|
|
children: [
|
|
|
|
InkWell(
|
|
|
|
child: Container(
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: ScreenUtil().setWidth(10),
|
|
|
|
vertical: ScreenUtil().setWidth(10)),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: true
|
|
|
|
? MyColours.color_199095
|
|
|
|
: MyColours.color_ffffff,
|
|
|
|
borderRadius: BorderRadius.only(
|
|
|
|
topLeft: Radius.circular(
|
|
|
|
ScreenUtil().setWidth(10)),
|
|
|
|
bottomLeft: Radius.circular(
|
|
|
|
ScreenUtil().setWidth(10))),
|
|
|
|
border: Border.all(
|
|
|
|
color: MyColours.color_199095,
|
|
|
|
width: ScreenUtil().setWidth(2))),
|
|
|
|
child: Text('公历',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(28),
|
|
|
|
color: true
|
|
|
|
? MyColours.color_ffffff
|
|
|
|
: MyColours.color_333333)),
|
|
|
|
)),
|
|
|
|
InkWell(
|
|
|
|
child: Container(
|
|
|
|
padding: EdgeInsets.symmetric(
|
|
|
|
horizontal: ScreenUtil().setWidth(10),
|
|
|
|
vertical: ScreenUtil().setWidth(10)),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: false
|
|
|
|
? MyColours.color_199095
|
|
|
|
: MyColours.color_ffffff,
|
|
|
|
borderRadius: BorderRadius.only(
|
|
|
|
topRight: Radius.circular(
|
|
|
|
ScreenUtil().setWidth(10)),
|
|
|
|
bottomRight: Radius.circular(
|
|
|
|
ScreenUtil().setWidth(10))),
|
|
|
|
border: Border.all(
|
|
|
|
color: MyColours.color_199095,
|
|
|
|
width: ScreenUtil().setWidth(2))),
|
|
|
|
child: Text('农历',
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: ScreenUtil().setSp(28),
|
|
|
|
color: false
|
|
|
|
? MyColours.color_ffffff
|
|
|
|
: MyColours.color_333333))),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
Row(
|
|
|
|
children: [
|
|
|
|
InkWell(
|
|
|
|
child: Container(
|
|
|
|
height: ScreenUtil().setWidth(47 * 2),
|
|
|
|
alignment: Alignment.center,
|
|
|
|
child: Text(
|
|
|
|
'取消',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_199095,
|
|
|
|
fontSize: ScreenUtil().setWidth(34)),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
onTap: () {
|
|
|
|
Navigator.of(context).pop();
|
|
|
|
},
|
|
|
|
),
|
|
|
|
InkWell(
|
|
|
|
child: Container(
|
|
|
|
height: ScreenUtil().setWidth(47 * 2),
|
|
|
|
alignment: Alignment.center,
|
|
|
|
child: Text(
|
|
|
|
'保存',
|
|
|
|
style: TextStyle(
|
|
|
|
color: MyColours.color_199095,
|
|
|
|
fontSize: ScreenUtil().setWidth(34)),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
onTap: () {
|
|
|
|
if (name == '' || name.trim().length == 0) {
|
|
|
|
Utils.showToast('请输入纪念日名称');
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
Navigator.of(context).pop();
|
|
|
|
rCallback(name);
|
|
|
|
},
|
|
|
|
)
|
|
|
|
],
|
|
|
|
)
|
|
|
|
],
|
|
|
|
)),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
));
|
|
|
|
},
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
// static Future festivalAlertDialog(BuildContext context,
|
|
|
|
// {String title = "标题",
|
|
|
|
// String text = "内容",
|
|
|
|
// String hintText = "内容",
|
|
|
|
// String lTitle = "取消",
|
|
|
|
// String rTitle = "确定",
|
|
|
|
// String toast = '请输入',
|
|
|
|
// VoidCallback lCallback,
|
|
|
|
// bool lenghtLimit = false,
|
|
|
|
// TextInputType keyboardType = TextInputType.text,
|
|
|
|
// CustomCallBack rCallback}) {
|
|
|
|
// String name = text;
|
|
|
|
// TextEditingController controller = TextEditingController();
|
|
|
|
// controller.text = text;
|
|
|
|
// showCupertinoDialog(
|
|
|
|
// context: context,
|
|
|
|
// builder: (context) {
|
|
|
|
// return Stack(children: [
|
|
|
|
// CupertinoAlertDialog(
|
|
|
|
// title: title != ''
|
|
|
|
// ? Text(title,
|
|
|
|
// style: TextStyle(
|
|
|
|
// fontWeight: FontWeight.bold,
|
|
|
|
// fontSize: ScreenUtil().setSp(30),
|
|
|
|
// ))
|
|
|
|
// : SizedBox(),
|
|
|
|
// content: Material(
|
|
|
|
// color: Colors.transparent,
|
|
|
|
// child: TextField(
|
|
|
|
// controller: controller,
|
|
|
|
// maxLines: 1,
|
|
|
|
// autofocus: true,
|
|
|
|
// // //光标颜色
|
|
|
|
// // cursorColor:
|
|
|
|
// // widget.isSelect ? Colors.white : MyColours.color_199095,
|
|
|
|
// //输入文本的样式
|
|
|
|
// inputFormatters: lenghtLimit
|
|
|
|
// ? [
|
|
|
|
// LengthLimitingTextInputFormatter(10),
|
|
|
|
// ]
|
|
|
|
// : [],
|
|
|
|
// textAlignVertical: TextAlignVertical.bottom,
|
|
|
|
// textAlign: TextAlign.center,
|
|
|
|
// style: TextStyle(
|
|
|
|
// fontSize: ScreenUtil().setSp(28),
|
|
|
|
// ),
|
|
|
|
// decoration: InputDecoration(
|
|
|
|
// border: OutlineInputBorder(borderSide: BorderSide.none),
|
|
|
|
// hintText: hintText,
|
|
|
|
// hintStyle: TextStyle(
|
|
|
|
// color: MyColours.color_999999,
|
|
|
|
// fontSize: ScreenUtil().setSp(28),
|
|
|
|
// ),
|
|
|
|
// enabledBorder: new UnderlineInputBorder(
|
|
|
|
// borderSide: BorderSide.none,
|
|
|
|
// ),
|
|
|
|
// focusedBorder: new UnderlineInputBorder(
|
|
|
|
// borderSide: BorderSide.none,
|
|
|
|
// ),
|
|
|
|
// ),
|
|
|
|
// onChanged: (value) {
|
|
|
|
// name = value;
|
|
|
|
// },
|
|
|
|
// onEditingComplete: () {
|
|
|
|
// FocusScope.of(context)
|
|
|
|
// .requestFocus(FocusNode()); //点击空白处隐藏键盘
|
|
|
|
// },
|
|
|
|
// keyboardType: keyboardType)),
|
|
|
|
// actions: [
|
|
|
|
// CupertinoDialogAction(
|
|
|
|
// child: Text(lTitle,
|
|
|
|
// style: TextStyle(
|
|
|
|
// fontSize: ScreenUtil().setSp(34),
|
|
|
|
// color: MyColours.color_666666)),
|
|
|
|
// onPressed: () {
|
|
|
|
// Navigator.of(context).pop();
|
|
|
|
// lCallback();
|
|
|
|
// },
|
|
|
|
// ),
|
|
|
|
// CupertinoDialogAction(
|
|
|
|
// child: Text(rTitle,
|
|
|
|
// style: TextStyle(
|
|
|
|
// fontSize: ScreenUtil().setSp(34),
|
|
|
|
// color: MyColours.color_199095)),
|
|
|
|
// onPressed: () {
|
|
|
|
// if (name == '' || name.trim().length == 0) {
|
|
|
|
// Utils.showToast(toast);
|
|
|
|
// return;
|
|
|
|
// }
|
|
|
|
// Navigator.of(context).pop();
|
|
|
|
// rCallback(name);
|
|
|
|
// },
|
|
|
|
// ),
|
|
|
|
// ],
|
|
|
|
// ),
|
|
|
|
// Positioned(
|
|
|
|
// right: 0,
|
|
|
|
// top: 0,
|
|
|
|
// child: Text('删除',
|
|
|
|
// style: TextStyle(
|
|
|
|
// fontWeight: FontWeight.bold,
|
|
|
|
// fontSize: ScreenUtil().setSp(30),
|
|
|
|
// color: MyColours.color_199095)))
|
|
|
|
// ]);
|
|
|
|
// },
|
|
|
|
// );
|
|
|
|
// }
|
|
|
|
|
|
|
|
//输入弹框
|
|
|
|
static Future textfeildAlertDialog(BuildContext context,
|
|
|
|
{String title = "标题",
|
...
|
...
|
|