How could i add iosstyle datepicker in flutter and set it into a textfield. I tried few things but failed..getting android style datepicker and setting it up has many solutions but ios style datepicker doesnt have much solutions..Thanks for the help
use this
void _showIOS_DatePicker(ctx) {
showCupertinoModalPopup(
context: ctx,
builder: (_) => Container(
height: 190,
color: Color.fromARGB(255, 255, 255, 255),
child: Column(
children: [
Container(
height: 180,
child: CupertinoDatePicker(
initialDateTime: DateTime.now(),
onDateTimeChanged: (val) {
setState(() {
dateSelected = val.toString();
});
}),
),
],
),
));
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With