I am using Cupertino date picker . I want to achieve something like below image -
But currently it's look like below image -
This is my code -
CupertinoTheme(
data: CupertinoThemeData(
textTheme: CupertinoTextThemeData(
dateTimePickerTextStyle: TextStyle(
fontSize: 20,
color: Colors.white
),
),
),
child: CupertinoDatePicker(
mode: CupertinoDatePickerMode.date,
onDateTimeChanged: (DateTime dateTime) {},
),
)
How to achieve like first image ? Is there any library to achieve similar?
Not sure if we could do that in CupertinoDatePicker
.
But
You could use Flutter Cupertino Date Picker to achieve the layout you want. You could either show it as bottom-sheet or a widget
Null Safe Version : flutter_cupertino_datetime_picker
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.