我只想使用 Cupertino 制作一个日期选择器。像下面的东西
但我能做的就是……有人能帮忙吗?
Container(
height: MediaQuery.of(context).copyWith().size.height / 3,
child: CupertinoDatePicker(
initialDateTime: DateTime.now(),
onDateTimeChanged: (DateTime newdate) {
print(newdate);
setState(() {
_currentdate = newdate;
});
},
use24hFormat: true,
maximumDate: new DateTime(2050, 12, 30),
minimumYear: 2010,
maximumYear: 2018,
minuteInterval: 1,
mode: CupertinoDatePickerMode.dateAndTime,
),
),