Open laterdayi opened 5 months ago
Thanks for the report. Reproduced the issue on the latest Flutter stable and master channels.
Some additional info:
TextField
CupertinoApp
with CupertinoThemeData(brightness: Brightness.dark)
to theme, issue will not happen as well but we will not achieve application theme by there is no themeMode
on CupertinoApp.(I updated your description as your Expected results and Actual results are similar)
Yeah, so that means if I don't use CupertinoApp, I can't use Cupertino's components, CupertinoApp and material APP can't exist together
https://github.com/flutter/flutter/issues/146864 This problem has been around for a few years, but unfortunately it hasn't been solved yet
@laterdayi Could you use a CupertinoTheme widget to set the Cupertino styles for your Material app?
FYI @MitchellGoodwin
Also FYI @Renzo-Olivares this is related to the adaptive widget idea for text fields.
The Material App does wrap itself with a Cupertino theme by default, but it doesn't look at themeMode
. It does look at brightness
in the ThemeData
though. So there are three work arounds that I believe will work.
Brightness.dark
to your Material theme data.
Steps to reproduce
In dark mode, the CupertinoTextField cannot display text colors
Expected results
In dark mode, the CupertinoTextField can display text colors
Actual results
In dark mode, the CupertinoTextField cannot display text colors
Code sample
Screenshots or Video
Screenshots / Video demonstration
[Upload media here]Logs
Logs
```console [Paste your logs here] ```Flutter Doctor output
*