Flutter : get appbar's height - Iphone 14 Pro Max

661 Views Asked by At

I have an appbar in my flutter app. I'm use an padding to display a container

Padding(
padding: const EdgeInsets.only(
top: kToolbarHeight + kTextTabBarHeight,)

With Android and all iphone devices, that's ok like this image

enter image description here

But with Iphone pro 14 max and Safearea feature, my padding is not working (see image)

enter image description here

Should i have to add a constant in my padding to support "SafeArea iphone 14 max pro" feature ?

Thx

2

There are 2 best solutions below

1
Udit On

Can you try it with SafeArea as you mentioned also if you can share the repo link it will make things easier

0
andrepo On

How about kFloatingActionButtonMargin + AppBar().preferredSize.height + kTextTabBarHeight