this error was already mentioned but could not be solved yet.
CupertinoDatePicker works in debug mode but not in the release version. Sometimes it works, sometimes this grey box appears:
return AlertDialog(
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(10.0))),
title: id == "start"
? Text(
"Start-Zeit",
style: TextStyle(
fontSize: 25.0,
fontWeight: FontWeight.w600,
color: Theme.of(context).accentColor),
)
: Text(
"End-Zeit",
style: TextStyle(
fontSize: 25.0,
fontWeight: FontWeight.w600,
color: Theme.of(context).accentColor),
),
content: Container(
height: 120.0,
child: CupertinoTheme(
data: CupertinoThemeData(
textTheme: CupertinoTextThemeData(
dateTimePickerTextStyle: TextStyle(fontSize: 25.0))),
child: CupertinoDatePicker(
mode: CupertinoDatePickerMode.time,
use24hFormat: true,
minuteInterval: 1,
initialDateTime: initialTime,
onDateTimeChanged: (DateTime newDateTime) {
initialTime = newDateTime;
}),
),
),
);
I tried to change the themeData but it´s hard to find the problem because it´s finde in debug mode and in most of the release versions
Update:
deleting the CupertinoTheme-Code solves the issue, but I want to use the theme data, so don´t know what kind of rendering issue.