-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Description
Use case
Currently the Flutter engine uses the dayOverlayColor to assign color to the selected day button. This is not intuitive and also limits the customization of the Date Picker, since the dayOverlayColor and dayBackgroundColor must be similar, since there is no way to select the color of the text of the selected day.
Imagine the following: I'm using a white background for all dates and a blue text color.
dayBackgroundColor: Colors.white,
dayForegroundColor: Colors.blue,If I set the dayOverlayColor to Colors.blue, when the user selects a date, I'd have a round blue button with, what would appear to be, no text.
Proposal
I propose that we add the following properties:
selectedBackgroundColor and selectedForegroundColor
where both properties, similar to the ones we have today, control, respectively, the background and foreground colors of the button.
or
selectedDayTheme
where we could have a ButtonStyle to assign the colors.
I also propose that we standardize the other properties to be like the confirmButtonStyle, making it intuitive for the user to customize the dialog.
PS: the same thing should be done to the year buttons as well.