1

I'm trying to get the height of the system navigation bar so that I can calculate the height of other widgets accordingly.

I was able to get the height of the screen. Is there a way to get the usable height?

usable_height = total_height-(status_bar_height + navigation_bat_height)

I'm using this method to get the total screen size:

double getScreenHeight(BuildContext context) {
  return MediaQuery.of(context).size.height;
}
molive
  • 13
  • 3

1 Answers1

1

If your Widgets need to know the size available to them then you can wrap them in LayoutBuilder which will have the width and height available to you Widget

Watch official sample here: https://www.youtube.com/watch?v=IYDVcriKjsw

Some examples:


But if want to know the AppBar height then AppBar height in Flutter

Doc
  • 10,831
  • 3
  • 39
  • 63