Flutter Tutorial - Get Widget Size & Position - Get X, Y, Width & Height Of Widget

preview_player
Показать описание
Determine the Widget Size, Width, Height, and also the Position, X, Y of a Widget in Flutter Using Render Object.

SUBSCRIBE HERE

SUPPORT & SPONSOR ME

RESOURCES

TIMELINE
0:00 Introduction Widget Size & Position
0:44 Set GlobalKey for Widget
1:28 Display Size & Positions
2:33 Calculate Widget Size & Position
4:36 Calculate Size & Position Immediately

SHARE | SUBSCRIBE | LIKE FOR MORE VIDEOS LIKE THIS

*********

SOCIAL MEDIA: Follow Us :-)

LEARN MORE

PLAYLISTS

CREDITS

#Flutter #Tutorial #JohannesMilke

LIKE & SHARE & ACTIVATE THE BELL
Thanks For Watching :-)
Рекомендации по теме
Комментарии
Автор

This was really great... I can recount countless times in the past where if I had known this my life could have been so much more easier!

yoapps
Автор

Please keep the good work flowing. I love your videos' contents.

hatimus
Автор

This will help: final RenderBox box = as RenderBox;

fantamagier
Автор

Congratulations, we are 7K !
waiting for more and more...

VladVons
Автор

Nice one! But I have a question: you said that we can't get those values during the build, but if I need to resize some widget base on another widget, I think I need to do it during build proccess. Think about having an image and you need to know how much space it will fill and calculate other widgets based on this information. I dont know how to do it.

Thanks for one more very useful video! I really like your videos.

gnrslashsp
Автор

nice tutorial bro but could you make annother video about using overlaywih dropdown using size and position ?

mohamedkhattab
Автор

Thank you so much for this tutorial !
Quick question : what if i want to get the size of a future widget inside a stream builder. where exactly should i call the "getSize" function knowing that it may lead to flickerin due to the setState();.
Thank in advance.

aymenfayadhi
Автор

Hello Milke, nice content, very useful. I am wondering can we get current position of draggable widget with GlobalKey if we call the function for calculating in onDragStarted so we can calculate while it is dragged around?

samggez
Автор

Hi, J Milke, have you any tutorial or link for pick multiple images from gallery if yes please guide me how to use in flutter. Thanks alot.

lovekeshsinghkhalsa
Автор

How to paste the code in your tutorial is there any software ?...

ankiy
Автор

I don't get it. Was render box changed recently in flutter? your code doesnt let me do this: final RenderBox box =
It says it should be RenderObject instead but then the rest of the code does not work with RenderObject so I am not sure what was changed?

It seems there is no updated version on how to find a widget size anywhere on the internet. Could you help? Thank you!

nitzaneliyahu
Автор

Can anyone tell me
In Which aspect ratio flutter show image in app & how to calculate the aspect ratio

pubgmobile-irti
Автор

👌👌
Awesome tutorial!

How we can make an VPN app in flutter?
Would you try ever?

#thankyou #flutter #stayhealthy

ezone
Автор

how to get Screen Size, width, height of device without mediaQuery.of(context) ? i want to draw a line for inside of specific widget, i don't know how to do it...

ashokkmr
Автор

after upgrading flutter doesn't work RenderBox. Please update your video.

mirshodbaxromov
Автор

I got this error : The getter 'currentContext' isn't defined for the type 'Key'.
Try importing the library that defines 'currentContext', correcting the name to the name of an existing getter, or defining a getter or field named 'currentContext'.
What should I do ?
Please help!

aayushtheapple
Автор

I cant seem to get a RenderBox from a RenderObject, this works but size is not actually correct for me final renderBox = as RenderBox; So im getting 670 which isnt high enough, im starting to dislike flutter to be honest, absolutely awful at times, thanks for the videos though.

TYNEPUNK