I need to change the font size of CupertinoDatePicker so it looks more like native one. The font is small compared to ios datepicker.
For the height wrapping in a Container with height of MediaQuery.of(context).copyWith().size.height / 3
makes the height to be similar to native one.
You can change the font size of text in a Text Widget using style property. Create a TextStyle object with fontSize and specify this object as style for Text Widget.
Another way to do this, is to wrap the CupertinoDatePicker
in CupertinoTheme
.
CupertinoTheme(
data: CupertinoThemeData(
textTheme: CupertinoTextThemeData(
dateTimePickerTextStyle: TextStyle(
fontSize: 16,
),
),
),
child: CupertinoDatePicker(
...
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