How to customize CalendarDatePicker- Flutter

Viewed 1048

How to change the top of the calendar and the colors in it? I'm using CalendarDatePicker to do it, but there is no option unfortunately. Any help will be really usefull.

DateTime setDate = DateTime.now();

Widget openDatePicker() {
return Center(
    child: Container(
        // margin: const EdgeInsets.symmetric(vertical: 50.0, horizontal: 60),
        width: 300,
        height: 300,
        decoration: BoxDecoration(
            color: Colors.white,
            border: Border.all(color: Colors.orangeAccent, width: 2),
            borderRadius: BorderRadius.all(Radius.circular(40)),
            boxShadow: [
              BoxShadow(
                color: Colors.grey.withOpacity(0.5),
                spreadRadius: 5,
                blurRadius: 7,
                offset: Offset(0, 3), // changes position of shadow
              ),
            ]),
        child: CalendarDatePicker(
          initialDate: setDate,
          firstDate: DateTime.now(),
          lastDate: DateTime.now().add(Duration(days: 100000)),
          onDateChanged: (DateTime value) {},
        )));
   }

I want that it will look in this way:

enter image description here

But for now my result looks in this way:

enter image description here

0 Answers
Related