I am using showDatePicker() to display a Datepicker in my Flutter App.
How can I change the purple color?
Here is my Theme so far:
DatePickerThemeData(
backgroundColor: Color.fromARGB(255, 38, 41, 48),
surfaceTintColor: Colors.transparent,
headerForegroundColor: Colors.white,
)
try this :
DatePickerThemeData(
backgroundColor: Color.fromARGB(255, 38, 41, 48),
surfaceTintColor: Colors.transparent,
headerForegroundColor: Colors.white,
//u need to match the text color also
dayBackgroundColor: MaterialStateProperty.resolveWith((states) {
if (states.contains(MaterialState.selected)) {
return Colors.green;
}
return Colors.black;
}),)