flutterdartcupertinopicker

Flutter : Change Text Color CupertinoDatePicker in mode Dark Mode


I have CupertinoDatePicker in my application to selected date and time with this code :

formatColumn(
widget: Consumer<MainCalendarProvider>(
 builder: (_, mcProvider, __) => SizedBox(
 height: sizes.height(context) / 3.5,
child: CupertinoDatePicker(
initialDateTime: result['dateRevision'],
 minimumDate: result['dateRevision'],
use24hFormat: true,
onDateTimeChanged: (dateChange) {
mcProvider.setSelectedDateFromCupertinoDatePicker(  dateChange, );},
                                      ),
                                    ),
                                  ),
                                  title: 'Date Activity'),

Everything is work , until i added feature dark mode in my application. In mode dark mode text color CupertinoDatePicker still black , i want change this to white. In CupertinoDatePicker , only have backgroundcolor property. I already try change to Red,Blue,Green etc but the text still black.

How can i change this ?

Thank's.

enter image description here


Solution

  • I don't know if you're missing some styles in your Theme, but one of these solutions might do the trick!