How to get status bar height in Flutter?


How do I get the status bar height?

enter image description here


var height = MediaQuery.of(context);

Note: This will only work on mobile devices because other platforms don’t have a dedicated status bar and it will returns 0.0 for them.

Answered By – iDecode

Answer Checked By – David Goodson (FlutterFixes Volunteer)

Leave a Reply

Your email address will not be published. Required fields are marked *