<p id="9cdcfe;](key," color:="" color:="">You can get the size of the screen in flutter using MediaQuery as below.Here is an example of how to use that in your program. color: #9cdcfe;](args) color: #569cd6;](class color: #4ec9b0;](MyApp color: #569cd6;](extends color: #4ec9b0;](StatelessWidget ); color: #9cdcfe;](@color: #9cdcfe;](override color: #4ec9b0;](Widget color: #dcdcaa;](build(color: #4ec9b0;](BuildContext color: #9cdcfe;](context) { color: #c586c0;](return color: #569cd6;](const color: #4ec9b0;](MaterialApp( color: #9cdcfe;](home: color: #4ec9b0;](Scaffold( color: #9cdcfe;](body: color: #4ec9b0;](MyContainer(), ), ); }} color: #569cd6;](class color: #4ec9b0;](MyContainer color: #569cd6;](extends color: #4ec9b0;](StatelessWidget ); color: #9cdcfe;](@color: #9cdcfe;](override color: #4ec9b0;](Widget color: #dcdcaa;](build(color: #4ec9b0;](BuildContext color: #9cdcfe;](context) { color: #569cd6;](var color: #9cdcfe;](screenOrientation = color: #4ec9b0;](MediaQuery.color: #dcdcaa;](of(color: #9cdcfe;](context).color: #9cdcfe;](orientation; color: #c586c0;](return color: #4ec9b0;](Center( color: #9cdcfe;](child: color: #4ec9b0;](Padding( color: #9cdcfe;](padding: color: #569cd6;](const color: #4ec9b0;](EdgeInsets.color: #dcdcaa;](symmetric(color: #9cdcfe;](vertical: color: #b5cea8;](100), color: #9cdcfe;](child: color: #4ec9b0;](Padding( color: #9cdcfe;](padding: color: #569cd6;](const color: #4ec9b0;](EdgeInsets.color: #dcdcaa;](all(color: #b5cea8;](28.0), color: #9cdcfe;](child: color: #4ec9b0;](Column( color: #9cdcfe;](crossAxisAlignment: color: #4ec9b0;](CrossAxisAlignment.color: #4fc1ff;](start, color: #9cdcfe;](children: [ color: #569cd6;](const color: #4ec9b0;](SizedBox( color: #9cdcfe;](height: color: #b5cea8;](20, ), color: #4ec9b0;](Text( color: #ce9178;]('Screen Orientation - $color: #9cdcfe;](screenOrientationcolor: #ce9178;](', color: #9cdcfe;](style: color: #569cd6;](const color: #4ec9b0;](TextStyle(color: #9cdcfe;](fontSize: color: #b5cea8;](18.0), ), ], ), ), ), ); }}</p> <pre></pre>
How to get screen orientation in flutter?
This Article is posted by seven.srikanth at 11/14/2022 4:38:41 PM
Check out our other latest articles
Safearea widget - How to avoid visual overlap with Notch on flutter mobile app?How to convert row of widgets into column of widgets in flutter based on screen size?
How to run Flutter programs from GitHub?
How to get screen orientation in flutter?
NavigationRail example in flutter
Tags: screen orientation in flutter
Check out our other latest articles
Safearea widget - How to avoid visual overlap with Notch on flutter mobile app?How to convert row of widgets into column of widgets in flutter based on screen size?
How to run Flutter programs from GitHub?
How to get screen orientation in flutter?
NavigationRail example in flutter