Flutter - The LayoutBuilder (App Responsiveness + Know The Width/Height of A Widget)

Pubblicato il: 17 giugno 2021
sul canale di: Flutter Mentor
6,318
153

LayoutBuilders are the best way to know what the height of your widgets is.

Now, if you need such information before returning the build method, then you'd have to use a MediaQuery (video for that here:    • Flutter - How To Get A Widget's Size ...  ).

But if you'd just like to know a widget's dimensions after the return method, then the LayoutBuilder will be your best friend!

Simply make it the CHILD of whatever widget it is that you want to know the dimensions of and that's it!

00:00 - Intro
00:32 - Code Overview
01:17 - Using The LayoutBuilder
04:50 - Conditionals With LayoutBuilder
05:43 - Final Conclusions & Advice
06:30 - Like & Subscribe
06:38 - Flutter Mentor Out

#flutter #layoutbuilder #responsive

Credits:

OUTRO SONG:
Mitsubachi by Smith The Mister https://smiththemister.bandcamp.com
Smith The Mister https://bit.ly/Smith-The-Mister-YT
Free Download / Stream: http://bit.ly/mitsubachi
Music promoted by Audio Library    • Mitsubachi – Smith The Mister (No Cop...  


In questa pagina del sito puoi guardare il video online Flutter - The LayoutBuilder (App Responsiveness + Know The Width/Height of A Widget) della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Flutter Mentor 17 giugno 2021, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 6,318 volte e gli è piaciuto 153 spettatori. Buona visione!