选择罗盘图片
This commit is contained in:
@ -57,13 +57,13 @@ class _BirthCalState extends State<BirthCalPage> {
|
||||
lunar_month = date.month;
|
||||
lunar_day = date.day;
|
||||
|
||||
_controllerDate.text = "${lunar_year}年${lunar_month}月${lunar_day}日";
|
||||
_controllerDate.text = "${lunar_year}年${lunar_month}月${lunar_day}日 $hour时$minute分";
|
||||
} else {
|
||||
year = date.year;
|
||||
month = date.month;
|
||||
day = date.day;
|
||||
|
||||
_controllerDate.text = "${year}年${month}月${day}日";
|
||||
_controllerDate.text = "${year}年${month}月${day}日 $hour时$minute分";
|
||||
}
|
||||
// _controllerDate.text = year.toString()+"年"+month.toString()+"月"+day.toString()+"日";
|
||||
});
|
||||
@ -99,7 +99,7 @@ class _BirthCalState extends State<BirthCalPage> {
|
||||
}
|
||||
|
||||
_showDateTimePicker() {
|
||||
Pickers.showDatePicker(context, mode: DateMode.YMDHMS, onConfirm: (p) {
|
||||
Pickers.showDatePicker(context, mode: DateMode.YMDHM, onConfirm: (p) {
|
||||
setState(() {
|
||||
hour = p.hour;
|
||||
minute = p.minute;
|
||||
@ -141,7 +141,7 @@ class _BirthCalState extends State<BirthCalPage> {
|
||||
month = json.decode(tmp)['cMonth'];
|
||||
day = json.decode(tmp)['cDay'];
|
||||
|
||||
_controllerDate.text = "${lunar_year}年${lunar_month}月${lunar_day}日";
|
||||
_controllerDate.text = "${lunar_year}年${lunar_month}月${lunar_day}日 $hour时$minute分";
|
||||
});
|
||||
});
|
||||
}
|
||||
@ -167,7 +167,7 @@ class _BirthCalState extends State<BirthCalPage> {
|
||||
lunar_month = json.decode(tmp)['lMonth'];
|
||||
lunar_day = json.decode(tmp)['lDay'];
|
||||
|
||||
_controllerDate.text = "${year}年${month}月${day}日";
|
||||
_controllerDate.text = "${year}年${month}月${day}日 $hour时$minute分";
|
||||
});
|
||||
});
|
||||
}
|
||||
@ -345,6 +345,7 @@ class _BirthCalState extends State<BirthCalPage> {
|
||||
borderRadius: BorderRadius.circular(30)),
|
||||
alignment: Alignment.center,
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
@ -394,7 +395,7 @@ class _BirthCalState extends State<BirthCalPage> {
|
||||
backgroundColor: MaterialStateProperty.all(
|
||||
isLunar
|
||||
? Colors.transparent
|
||||
: Color(0xCFA77300)),
|
||||
: const Color(0xCFA77300)),
|
||||
shape: MaterialStateProperty.all(
|
||||
RoundedRectangleBorder(
|
||||
borderRadius:
|
||||
@ -432,7 +433,7 @@ class _BirthCalState extends State<BirthCalPage> {
|
||||
day = json.decode(tmp)['cDay'];
|
||||
|
||||
_controllerDate.text =
|
||||
"${lunar_year}年${lunar_month}月${lunar_day}日 $hour时$minute分";
|
||||
"$lunar_year年$lunar_month月$lunar_day日 $hour时$minute分";
|
||||
});
|
||||
});
|
||||
}
|
||||
@ -446,7 +447,7 @@ class _BirthCalState extends State<BirthCalPage> {
|
||||
style: ButtonStyle(
|
||||
backgroundColor: MaterialStateProperty.all(
|
||||
isLunar
|
||||
? Color(0xCFA77300)
|
||||
? const Color(0xCFA77300)
|
||||
: Colors.transparent),
|
||||
shape: MaterialStateProperty.all(
|
||||
RoundedRectangleBorder(
|
||||
@ -456,7 +457,7 @@ class _BirthCalState extends State<BirthCalPage> {
|
||||
))
|
||||
],
|
||||
),
|
||||
const Padding(padding: EdgeInsets.only(top: 80)),
|
||||
const Padding(padding: EdgeInsets.only(top: 40)),
|
||||
Row(
|
||||
children: [
|
||||
const Padding(
|
||||
@ -464,7 +465,7 @@ class _BirthCalState extends State<BirthCalPage> {
|
||||
left: 10,
|
||||
right: 10,
|
||||
),
|
||||
child: Text("出生日期:", style: TextStyle(fontSize: 18)),
|
||||
child: Text("出生时间:", style: TextStyle(fontSize: 18)),
|
||||
),
|
||||
Expanded(
|
||||
child: TextField(
|
||||
@ -510,7 +511,7 @@ class _BirthCalState extends State<BirthCalPage> {
|
||||
// icon: Icon(Icons.timelapse_outlined))
|
||||
// ],
|
||||
// ),
|
||||
Padding(padding: EdgeInsets.only(top: 80)),
|
||||
const Padding(padding: EdgeInsets.only(top: 40)),
|
||||
// 切换奇门类型,单选框
|
||||
Row(
|
||||
children: [
|
||||
|
Reference in New Issue
Block a user