Removed DayPicker dependence on accentColor. (#78576)

This commit is contained in:
Darren Austin
2021-03-19 15:36:03 -07:00
committed by GitHub
parent 2e06ed0787
commit 7fe4a1bf04

View File

@@ -263,16 +263,16 @@ class DayPicker extends StatelessWidget {
final bool isSelectedDay = selectedDate.year == year && selectedDate.month == month && selectedDate.day == day;
if (isSelectedDay) {
// The selected day gets a circle background highlight, and a contrasting text color.
itemStyle = themeData.accentTextTheme.bodyText1;
itemStyle = themeData.textTheme.bodyText1;
decoration = BoxDecoration(
color: themeData.accentColor,
color: themeData.colorScheme.secondary,
shape: BoxShape.circle,
);
} else if (disabled) {
itemStyle = themeData.textTheme.bodyText2!.copyWith(color: themeData.disabledColor);
} else if (currentDate.year == year && currentDate.month == month && currentDate.day == day) {
// The current day gets a different text color.
itemStyle = themeData.textTheme.bodyText1!.copyWith(color: themeData.accentColor);
itemStyle = themeData.textTheme.bodyText1!.copyWith(color: themeData.colorScheme.secondary);
}
Widget dayWidget = Container(