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 : 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 : 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