Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR DART

how to get the display size of mobile display in flutter

getHeightWidth(context){
 
    double width = MediaQuery.of(context).size.width;
 
    double height = MediaQuery.of(context).size.height;
 
    setState(() {
     heightHolder = height.roundToDouble();
     widthHolder = width.roundToDouble() ; 
    });
 
  }
Source by flutter-examples.com #
 
PREVIOUS NEXT
Tagged: #display #size #mobile #display #flutter
ADD COMMENT
Topic
Name
3+9 =