<p>You can achieve this using the media query. Alternatively, you can also check this article to achieve this, [https://fluttercentral.com/Articles/Post/5325/Safearea_widget_How_to_avoid_visual_overlap_with_Notch_on_flutter_mobile_app](Safearea widget - How to avoid visual overlap with Notch on flutter mobile app? - FlutterCentral)</p> <p>Here is the output of this example.</p> <p>);" color:="" color:=>color: #9cdcfe;](args) </p> <p id="9cdcfe;](key" color:= color:=>color: #569cd6;](class color: #4ec9b0;](MyApp color: #569cd6;](extends color: #4ec9b0;](StatelessWidget ); color: #9cdcfe;](@ color: #9cdcfe;](override</p> <p>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;](MyWidget(), ), ); } }</p> <p id="9cdcfe;](key," color:= color:="" color:="">color: #569cd6;](class color: #4ec9b0;](MyWidget color: #569cd6;](extends color: #4ec9b0;](StatelessWidget ); color: #9cdcfe;](@ color: #9cdcfe;](override</p> <p>color: #4ec9b0;](Widget color: #dcdcaa;](build(color: #4ec9b0;](BuildContext color: #9cdcfe;](context) { color: #569cd6;](var color: #9cdcfe;](notchPadding = color: #4ec9b0;](MediaQuery.color: #dcdcaa;](of(color: #9cdcfe;](context).color: #9cdcfe;](padding; color: #c586c0;](return color: #4ec9b0;](Center( color: #9cdcfe;](child: color: #4ec9b0;](Container( color: #9cdcfe;](color: color: #4ec9b0;](Colors.color: #9cdcfe;](red, color: #9cdcfe;](margin: color: #9cdcfe;](notchPadding, color: #9cdcfe;](child: color: #4ec9b0;](Center( color: #9cdcfe;](child: color: #4ec9b0;](Text( color: #ce9178;]('$color: #9cdcfe;](notchPadding color: #ce9178;](', color: #9cdcfe;](style: color: #569cd6;](const color: #4ec9b0;](TextStyle(color: #9cdcfe;](fontSize: color: #b5cea8;](30.0), ), ), ), ); } } ` Thanks,Srikanth</p>
MediaQuery.padding - How to avoid visual overlap with Notch on flutter mobile app?
This Article is posted by seven.srikanth at 11/16/2022 4:55:00 AM
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: MediaQuery; Padding; Notch; visual overlap; add padding to top of the screen;
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