Open ezawa-arise opened 8 months ago
can i get the release / debug application to test my self. and also instead of changing by going ( Display -> Display Size page.) do this by going Settings -> developer options -> dpi for android (in your case) . also verify that is this this problem with all android 12 devices or is that your specific.
@RudraOp9 Thank you for your comment.
can i get the release / debug application to test my self.
We are sorry, but due to an event that occurred in the development of an application for business use, we are unable to provide you with the application. Instead, we can confirm that it can be reproduced with "Google Ads," one of the Flutter-made apps available on the Google Play Store. We believe we can also reproduce it with the Flutter default app.
and also instead of changing by going ( Display -> Display Size page.) do this by going Settings -> developer options -> dpi for android (in your case) .
This issue is not intended to be a developer option, as this bug is caused by general Android user operations.
also verify that is this this problem with all android 12 devices or is that your specific.
Thank you for pointing this out. We believe it occurs on all Android 12 devices, but indeed we have only confirmed it on some Android 12 devices. Below are the specifications of the Android 12 devices used in our investigation
Hi @ezawa-arise, it appears that you are using an older version of the flutter framework, can you upgrade to the latest version of flutter stable (3.16.9) to see if you still experience this issue?
Please provide the updated output of flutter doctor -v
if you still experience this issue after the upgrade.
Thank you
@danagbemava-nc
I still experience this issue after upgrade to flutter 3.16.9-stable.
Attached below is a log of flutter doctor -v
.
[✓] Flutter (Channel stable, 3.16.9, on macOS 13.3.1 22E772610a darwin-arm64, locale ja-JP)
• Flutter version 3.16.9 on channel stable at /Users/yuki.ezawa/.asdf/installs/flutter/3.16.9-stable
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 41456452f2 (12 days ago), 2024-01-25 10:06:23 -0800
• Engine revision f40e976bed
• Dart version 3.2.6
• DevTools version 2.28.5
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
• Android SDK at /Users/yuki.ezawa/Library/Android/sdk
• Platform android-33, build-tools 33.0.2
• Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 14C18
• CocoaPods version 1.11.3
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2022.2)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694)
[✓] VS Code (version 1.85.1)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.80.0
[✓] Connected device (4 available)
• sdk gphone64 arm64 (mobile) • emulator-5554 • android-arm64 • Android 12 (API 31) (emulator)
• iPhone SE (3rd generation) (mobile) • 812919F4-7E51-4EC4-9368-262C7BC99202 • ios • com.apple.CoreSimulator.SimRuntime.iOS-16-2 (simulator)
• macOS (desktop) • macos • darwin-arm64 • macOS 13.3.1 22E772610a darwin-arm64
• Chrome (web) • chrome • web-javascript • Google Chrome 121.0.6167.139
[✓] Network resources
• All expected network resources are available.
• No issues found!
Reproducible only on android 12 using any flutter app and the steps outlined above.
Labeling for further investigation.
try this in your code it my fix the problem
builder: (context, child) { final originalTextScaleFactor = MediaQuery.of(context).textScaler; final boldText = MediaQuery.boldTextOf(context); final newMediaQueryData = MediaQuery.of(context).copyWith( textScaler: originalTextScaleFactor.clamp( minScaleFactor: 0.8, maxScaleFactor: 1.0, ), boldText: boldText, ); return MediaQuery(data: newMediaQueryData, child: child!); },
add this under MaterialAppWidget if this property is doesn't available try use GetMaterialApp
like this
return GetMaterialApp( builder: (context, child) { final originalTextScaleFactor = MediaQuery.of(context).textScaler; final boldText = MediaQuery.boldTextOf(context); final newMediaQueryData = MediaQuery.of(context).copyWith( textScaler: originalTextScaleFactor.clamp( minScaleFactor: 0.8, maxScaleFactor: 1.0, ), boldText: boldText, ); return MediaQuery(data: newMediaQueryData, child: child!); }, getPages: route, locale: const Locale('ar'), debugShowCheckedModeBanner: false, initialBinding: IntialBindings(), title: 'First Method', // You can use the library anywhere in the app even in theme theme: AppThemes.appLightTheme, home: // Directionality(textDirection: TextDirection.rtl, child: ) child! // ), ); }, child: const Home(),
While using an app developed with Flutter on an Android 12 device, we found a bug in which changing the display size in the OS settings is not reflected in the app. In more detail, the bug states that the first time you change the display size, the change is not reflected, and if you change the display size again, the settings from the first change are reflected.
We have investigated the conditions under which this bug occurs and have confirmed that it is limited to Android 12 and does not occur on Android 10, 11, 13, or iOS 15-17. We have also investigated multiple Flutter and non-Flutter apps and have confirmed that this bug only occurs in apps developed with Flutter.
The following are the steps to reproduce the bug.
Steps to reproduce
Display
->Display Size
page.Expected results
After Step.3 & Step.5
The display size of the application has been changed to the one you set.
Actual results
After Step.3
The app's display size has not been changed.
After Step.5
The display size is the same as the size set one time before (and this event repeats every time the size is changed afterwards).
Flutter Doctor output
Doctor output
```console [✓] Flutter (Channel stable, 3.13.8, on macOS 13.3.1 22E772610a darwin-arm64, locale ja-JP) • Flutter version 3.13.8 on channel stable at /Users/yuki.ezawa/.asdf/installs/flutter/3.13.8-stable • Upstream repository https://github.com/flutter/flutter.git • Framework revision 6c4930c4ac (4 months ago), 2023-10-18 10:57:55 -0500 • Engine revision 767d8c75e8 • Dart version 3.1.4 • DevTools version 2.25.0 [✓] Android toolchain - develop for Android devices (Android SDK version 33.0.2) • Android SDK at /Users/yuki.ezawa/Library/Android/sdk • Platform android-33, build-tools 33.0.2 • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694) • All Android licenses accepted. [✓] Xcode - develop for iOS and macOS (Xcode 14.2) • Xcode at /Applications/Xcode.app/Contents/Developer • Build 14C18 • CocoaPods version 1.11.3 [✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome [✓] Android Studio (version 2022.2) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 17.0.6+0-17.0.6b802.4-9586694) [✓] VS Code (version 1.85.1) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.80.0 [✓] Connected device (5 available) • sdk gphone64 arm64 (mobile) • emulator-5554 • android-arm64 • Android 13 (API 33) (emulator) • sdk gphone64 arm64 (mobile) • emulator-5556 • android-arm64 • Android 12 (API 31) (emulator) • iPhone SE (3rd generation) (mobile) • 812919F4-7E51-4EC4-9368-262C7BC99202 • ios • com.apple.CoreSimulator.SimRuntime.iOS-16-2 (simulator) • macOS (desktop) • macos • darwin-arm64 • macOS 13.3.1 22E772610a darwin-arm64 • Chrome (web) • chrome • web-javascript • Google Chrome 121.0.6167.139 [✓] Network resources • All expected network resources are available. • No issues found! ```