I am finding this hard to change the Date picker year in dark theme as it is not visible how to fix this.. Change the color of the year and arrow buttons for dark theme.
This is my code for date picker theme
datePickerTheme: DatePickerThemeData(
weekdayStyle: const TextStyle(color: Colors.white),
headerForegroundColor: Colors.white,
dayForegroundColor: MaterialStateColor.resolveWith((states) => Colors.white),
todayForegroundColor: MaterialStateColor.resolveWith((states) => Colors.white),
backgroundColor: const Color(0xff31343b),
elevation: .5,
yearForegroundColor: MaterialStateColor.resolveWith((states) => Colors.white),
),
Need to change the Date picker color in dark theme in flutter.

It looks like it might be controlled by the
onSurfaceproperty of the theme's color scheme. If you don't want to change theonSurfacefor the entire application you could give theshowDatePickerthis builder instead:I'm not sure if this totally fixes it but you can try this.