skip to Main Content

i need to detect current display size setting. How can i detect it?
enter image description here

2

Answers


  1. Chosen as BEST ANSWER

    Like @Dhafin Rayhan said, device pixel ration , was solution


  2. To detect the current display size setting in Flutter, you can use the MediaQuery class with the current context of your widget. Here’s an example of how to get the width and height of the screen:

    double width = MediaQuery.of(context).size.width;
    
    double height = MediaQuery.of(context).size.height;
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search