'Flutter MediaQuery vs constant value
Until today, everywhere in my application(paddings, sizedbox bla bla) I was using Mediaquery. I wasn't using any constant values. For example if I want to place a container
Container(height: MediaQuery.of(context).size.height * 0.1 ...);
But when I install my applications to another emulators, I started getting error RenderFlex overflow and I figured out it isn't true way to make responsive applications. So my question is when should I use Mediaqueries and when not use? Is my approach wrong? When I look at other examples, they using constant values and it works well. I tried it too and it's working fine so far.
Solution 1:[1]
Please try using this Sizer Package for responsive UI. I found it more efficient vs MediaQuery and tested it on various devices.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Afaq Ahmed |
