You can get the width and height of the Screen through MediaQuery.Size property.
Here is the code snippet from which you can get the width and height of the screen of the phone.
color: rgb(212, 212, 212); background-color: rgb(30, 30, 30); font-family: Consolas, "Courier New", monospace; font-size: 14px; line-height: 19px; white-space: pre-wrap;](color: #569cd6;](final sizeX = MediaQuery.of(context).size.width;color: #569cd6;](final sizeY = MediaQuery.of(context).size.height; Here is a sample example of how to use it in a program.
color: rgb(212, 212, 212); background-color: rgb(30, 30, 30); font-family: Consolas, "Courier New", monospace; font-size: 14px; line-height: 19px; white-space: pre-wrap;](color: #569cd6;](import color: #ce9178;]('package:flutter/material.dart';
color: #569cd6;](void main() => runApp(MyApp());
color: #569cd6;](class MyApp color: #569cd6;](extends StatelessWidget { color: #569cd6;](@override Widget build(BuildContext context) { color: #569cd6;](return MaterialApp( home: Scaffold( appBar: AppBar( title: Text(color: #ce9178;]('Rows and Columns'), ), body: Home(), ), ); }}
color: #569cd6;](class Home color: #569cd6;](extends StatelessWidget { color: #569cd6;](@override Widget build(BuildContext context) { color: #569cd6;](final sizeX = MediaQuery.of(context).size.width; color: #569cd6;](final sizeY = MediaQuery.of(context).size.height; color: #569cd6;](return Container( color: Colors.red, width: sizeX, height: sizeY, child: Column( mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ Text(color: #ce9178;]('Width: $sizeX' ), Text(color: #ce9178;]('HeiGht: $sizeY' ), ], ) ); }}
Hope this helps.Thanks,Srikanth