Closed milindgoel15 closed 1 year ago
update 5.8.2 or add this:
useInheritedMediaQuery: true,
return ScreenUtilInit(
useInheritedMediaQuery: true,
builder: (context, child) => MaterialApp(
...
5.8.2 change useInheritedMediaQuery default value to true
Hi, I just checked the documentation about useInheritedMediaQuery which says it avoids the keyboard overlay on text fields. But I am not able to understand its relation to the issue I had. Can you explain?
Don't worry, the new version will respond to theme changes normally even if useInheritedMediaQuery is false
Basically, When the material app is rendered in screen util builder, when the user changes the theme in the system from light to dark or vice versa, the theme in the app doesn't update.
When we render the app without screen util, it works fine. Note that the system chrome system UI mode should be there in the main function
Steps to reproduce:
Affected versions: flutter: 3.10 screen util: 5.8.1
Last working versions: flutter: 3.7.12 screen util: 5.7.0
expected behaviour: Theme does changes
actual behaviour: theme doesn't change
Screen recording: https://github.com/OpenFlutter/flutter_screenutil/assets/45682747/ce01900a-26f6-4789-a543-d0b28d7692f9