1

I am using Cupertino date picker . I want to achieve something like below image -

enter image description here

But currently it's look like below image -

enter image description here

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?

Farman Ali Khan
  • 822
  • 7
  • 24

1 Answers1

0

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

Sujan Gainju
  • 4,273
  • 2
  • 14
  • 34