i need to detect current display size setting. How can i detect it?
2
Like @Dhafin Rayhan said, device pixel ration , was solution
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;
Click here to cancel reply.
2
Answers
Like @Dhafin Rayhan said, device pixel ration , was solution
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: