Closed kyleorin closed 2 years ago
Can you specify iOS version?
You don't change the initial
value to change the theme. Do this instead.
AdaptiveTheme.of(context).setDark()
hi @BirjuVachhani sorry for the long wait, iOS is the latest version (currently 15) im looking to set the theme along with the device's theme is there any way to do that without the initial statement?
Use this:
AdaptiveTheme.of(context).setSystem();
getting this:
The named parameter 'initial' is required, but there's no corresponding argument. Try adding the required argument.
You don't change the
initial
value to change the theme. Do this instead.
AdaptiveTheme.of(context).setDark()
Where would you typically put this code?
changing the initial
to initial: AdaptiveThemeMode.system
worked after updating Xcode with the latest simulator version.
@reedrosenbluth I'd put it in a theme settings switch or chooser and go from there.
happening on iOS haven't tested on other platforms; trying to change the
initial
value tolight
orsystem
doesn't work even whenMediaQuery
reads the theme correctly.not sure what im doing wrong here