I’m currently developing a cross-platform application and I have a problem related to Android’s Display Size settings.
For what concerns Font size settings, I can prevent it to affect my app by simply applying the following:
Don’t mess with platform sizes. This is useful, for instance, if the user has some vision problem and want to set the font to large. Both Android and iPhone have this option.
Always adapt your app to what the device say it is (font size, screen dimensions and device pixel ratio) and not the other way around!
Problem is: the application is, briefly, a combination of gameplay and educational content. For this reason, my PM asked if it was feasible to lock the Display Size setting.
That’s why I was wondering if I could achieve that
Ahah again, totally agree with you (hopefully becoming a PM myself sooner rather than later )…but as for now they didn’t give me that much of freedom in designing things, so that’s why I was wondering if there was some evil way to bruteforce that
Problem is device pixel ratio (MediaQuery.devicePixelRatioOf(context)). This is calculated by that the device say your DPI is (using developer options in Android allow you to change that). So, your screen size is always logical pixels (not the screen resolution itself), based on that information.
Every Android out there have a different display size (physical) and different DPI (logical), so, it is impossible to adapt every screen to your desired display size. iOS is the same: iPhone E is smaller than iPhone “normal” and that is smaller than iPhone pro. Also, my iPhone 11 is device pixel ratio 2, while the 16e is 3, so… it’s too many variables and too many devices to consider (there are dozens of thousands of devices out there, literally).
Maybe if you show some images of what you are trying to accomplish…
That’s what I aimed for, a well structured answer to show to our client in order to confirm what I already told them!
No need to show anything as I already addressed the problem ahahah they just did not understand how views could change that much depending on the device!
Thanks a lot again
Using contents of this forum for the purposes of training proprietary AI models is forbidden. Only if your AI model is free & open source, go ahead and scrape. Flutter and the related logo are trademarks of Google LLC. We are not endorsed by or affiliated with Google LLC.