Answered by : lively-lizard-7mnzhssm9bs4
double height = MediaQuery.of(context).size.height;
double width = MediaQuery.of(context).size.width;
Source : https://stackoverflow.com/questions/49553402/flutter-screen-size | Last Update : Mon, 10 Aug 20
Answered by : glamorous-gibbon-w2fwom39789o
double width = MediaQuery.of(context).size.width;
double height = MediaQuery.of(context).size.height;
Source : https://stackoverflow.com/questions/49553402/flutter-screen-size | Last Update : Sat, 26 Sep 20
Answered by : priyam-harsh
double height = MediaQuery.of(context).size.height;
Source : | Last Update : Sat, 27 Jun 20
Answered by : attractive-addax-x95gt93fw3f5
//In logical pixels
var width = MediaQuery.of(context).size.width;
var height = MediaQuery.of(context).size.height;
var padding = MediaQuery.of(context).padding;
var safeHeight = height - padding.top - padding.bottom;
Source : https://stackoverflow.com/questions/49553402/how-to-determine-screen-height-and-width | Last Update : Sat, 09 Apr 22
Answered by : blushing-barracuda-f6zuzkdtkrwj
import 'package:flutter_screenutil/flutter_screenutil.dart';
Source : https://stackoverflow.com/questions/49553402/flutter-screen-size | Last Update : Mon, 05 Oct 20
Answered by : sore-sardine-8lil6kqpt1vd
MediaQuery.of(context).size.height - // total height kToolbarHeight - // top AppBar height MediaQuery.of(context).padding.top - // top padding kBottomNavigationBarHeight // BottomNavigationBar height
Source : https://flutterhq.com/questions-and-answers/2048/get-size-of-screen-without-bottom-navigation-bar-height | Last Update : Fri, 08 Jul 22
Answered by : blushing-barracuda-f6zuzkdtkrwj
dependencies: flutter: sdk: flutter # add flutter_ScreenUtil flutter_screenutil: ^0.4.2
Source : https://stackoverflow.com/questions/49553402/flutter-screen-size | Last Update : Mon, 05 Oct 20
Answered by : sore-sardine-8lil6kqpt1vd
// All height of screen
double screenHeight = MediaQuery.of(context).size.height
// height of screen only
double screenHeight = MediaQuery.of(context).size.height - MediaQuery.of(context).padding.top - kToolbarHeight - kBottomNavigationBarHeight;
Source : | Last Update : Sun, 19 Jun 22