Flexible (Flutter Widget of the Week)
Вставка
- Опубліковано 22 лип 2024
- Use Flexible for resizing your widgets in rows and columns. You can use it to adjust how much space different child widgets take up relative to their parent widgets.
Learn more about Flexible → goo.gle/2VhjGjs
Learn everything about Flutter at → goo.gle/2WAhEN1
Get more tips! → goo.gle/307BX6t
Subscribe! → goo.gle/Flutter
can you release these videos more often... they help so much to know about new widgets
I LOVE these snippet videos! They are considerate of my time and well done on the animation and explanations
Doesn't expanded() do the same thing when a flex is used with it?
This flexible widget saved the day for me, shot out to the Flutter team and that beanie wearing glasses guy
Given that these videos are roughly 1 minute long, we can learn the whole library and a couple of patterns in a couple of minutes!
Hi, at the very end of Widget of the Week #51 FractionallySizedBox, he mention's that you may want to wrap it in "Flexible" to make it "play nice" with columns or rows. I think you should have pointed this out in way more detail here? Many times I've had widgets that just "don't show up" because they don't play well with Column.
This widget can be used for create responsive apps?
Publish this kind of widgets each day please!
Thanks! Love these videos
Very useful widget. Particularly for web
Loving these videos so much, you call me crazy, but when i see them in my notification bar i jump off my chair
agustinbs you're crazy
Awesome widget 😍
Awesome widget!
Flutter is so damn amazing!
Mejor implementen una forma de como usar porcentajes(ancho y alto ,tamaño) en cambio de mediaqueries para hacer responsive
This is so helpful !!
plz make smth about rotating
what is the different between this and the expanded widget !!
Expanded forces the child to fill all available space in the Flex(), Flexible allows you to specify the strictness on filling the space in the Flex()
EX: Flexible could allow one to have a container's height be less, while the width is filled with Flex
Expanded would expand the container to the full height and width of the flex.
how Flexible is different from Expandable?
There is a great answer on stackoverflow. Check it there. It will clear all ur doubts.
yeah here's the link stackoverflow.com/questions/52645944/flutter-expanded-vs-flexible#:~:text=Widget%20under%20Expanded%20is%20MATCH_PARENT%20you%20can%20change%20it%20using%20flex.&text=You%20may%20use%20Flexible%20to%20resize%20the%20widgets%20in%20rows%20and%20columns.&text=Meanwhile%2C%20Expanded%20changes%20the%20constraints,fill%20the%20available%20spaces%20there.
A Expanded is just a Flexible with the fit property set to FlexFit.tight. The difference is seen in 0:54: with FlexFit.tight, the container must expand to fill the avaible space, whereas FlexFit.loose allows the container to have its preferred size.
Indeed. Expanded inherits Flexible, literally just adding "fit: FlexFit.tight", as can be seen in the constructor of Expanded from the Flutter docs:
const Expanded({
Key key,
int flex = 1,
@required Widget child,
}) : super(key: key, flex: flex, fit: FlexFit.tight, child: child);
It's a handy shortcut!
thanks man
What makes it different from Expanded Widget? Or This is new/updated version of Expanded Widget or vice versa?
It's late, but I had the same question. The Flexible Widget has a flex value and options for the type of fit. The Expanded Widget extends Flexible Widget, so it still has a flex value, but it always fills the space. Flexible is more flexible, Expanded is more readable when its default behavior is sufficient.
@@JeffNeet Understood. Thank you Jeff!
I think this example is wrong , you need to wrap column with Expanded widget to to see the the Flex effects. If I am wrong then please tell me that can flex work in the column without wrapping the column with expanded widget?
I love it!
How can I set the text size according to screen size ??
Please help
Check out the new Widget of the Week MediaQuery. You could use that to set the font sizes in your textTheme. ua-cam.com/video/A3WrA4zAaPw/v-deo.html
Unfortunately the view in 0:56 is actually wrong. The empty space appears at the very bottom. Love Flutter nonetheless!
Awesome!!!!
Nice vid
Always want to see flutter new video notification.
What is diff between flexible and expandable?
*This might help you, I guess:*
stackoverflow.com/questions/52645944/flutter-expanded-vs-flexible
I think this gives an idea:
class Expanded extends Flexible {
const Expanded({
Key key,
int flex = 1,
@required Widget child,
}) : super(key: key, flex: flex, fit: FlexFit.tight, child: child);
}
Google could you please implement a feature on UA-cam where a content creator and add code snippet at a given time in the video and then us as viewers can copy that code like at 0:34? Thank you
I love you guys
noma sana, kitu kama css grid
I have problem “try re-installing or updating your android sdk” 😢 How solve ?
LoL
close android studio and then reopen. make sure you have updated your dependencies. and you can always so a quick update in your terminal to check on the status of your sdk
nice !
Nice 👍
very nice
Cool!
Nice
Genius
I want to learn this language. 😊
so did u do it?
First comment. I wanted to do this for a long time.
Wow.....😍😀
So this is the Bootstrap Columns/Rows of Flutter, get it
nice
komen dulu ah
i love flutter
So, it's basically android's weight
hi
More
soved my roblem oh yeah
I'm not really comfortable with flutter. Idk why. Java/Kotlin is so much more easier to understand.
You mean Dart, not Flutter, Flutter is framework.
I think Dart is easier than Java/Kotlin.
:)