1

Viewport getting from flutter using MediaQuery.of(context).size.height. 411.4285X866.285

Device Actual Viewport 412x914

enter code here

Md Jahirul Islam
  • 211
  • 2
  • 10
  • 1
    Is this answer a clue for you? https://stackoverflow.com/a/57237870/10659482 – Akif Jan 04 '21 at 09:08
  • 1
    follow the link in the previous comment you will find a detailed explanation. but in short, your code will return the height and width with padding so that your app doesn't interfere with the device navigation bar and the structural constrains hiding some portions of your app. A better explanation would be it return the `context` width and height where the widgets can be painted. – Adithya Shetty Jan 04 '21 at 09:16
  • I am honored to see your comment. Actually, none of the solutions is working. It varies from device to device for android. For iOS it's fine. I mean "MediaQuery.of(context).size" is not working properly for android devices. If you have time you can do a check. – Md Jahirul Islam Jan 05 '21 at 04:38

0 Answers0