Flutter SafeArea

56 views Asked by At

I am new to flutter and I was wondering if there is any way to only get the padding values of the SafeArea Widget without using it. I only want some of my widgets to be affected by the padding and a complete SafeArea widget seems to overcomplicate everything.

Thanks in advance.

1

There are 1 answers

0
RaYmMiE On BEST ANSWER

MediaQuery with viewPadding do the trick, by using

MediaQuery.of(context).viewPadding

you can get padding informations (like app bar size...), you can also check this medium article.