List.generate (Technique of the Week)
ฝัง
- เผยแพร่เมื่อ 3 ต.ค. 2024
- Use List.generate to programatically create child widgets of rows, columns, and any widget that doesn’t have a builder constructor.
List.generate API documentation →goo.gle/3z3QsOS
[Flutter tutorial] Create mixed lists with different items → goo.gle/4caRpn1
Watch more Technique of the Week → goo.gle/Flutte...
Subscribe to Flutter → goo.gle/FlutterYT
#Flutter #TechniqueOfTheWeek
Speaker: Eric Windmill
Products Mentioned: Flutter - วิทยาศาสตร์และเทคโนโลยี
Now thats a series I'll follow
Это Словно Рождество))) ПРАЗДНИК!
finally , Technique of the week
Thank You Flutter
If I use List.generate() inside a build method, I will have to generate the list every time I build the widget, no? I feel like if I can avoid having to generate the list every build, I could just run the generate constructor and set that to an inst var.
Use statemanagement to handle build method calls
I’d wrap that logic into a new widget so that the list is only generated when the widget is rebuilt.
Put it outside the build method?
Correct. Though It is useful if your List contents depend on a changing state (which rebuilds the widget)
It's literally just 5 elements. Don't perf optimize something that doesn't take any time.
You don't bat an eyelid about writing a row with a list literal written out inside of it do you? Well that's constructing the list on every build too (assuming it's not const).
Part of being good at frontend is learning to forget "time complexity" and other stuff you learned in school-its almost never the bottleneck.
The great Flutter❤
Спасибо, всё работает. Ждём новых связок.
very nice.
can you show us the most efficient way of doing a bottom navigation which will keep its state while switching tabs?
greets
Use pageview then nest the pages in the children
Thanks, @xxThemoritzxx! This Code With Andrea resource on bottom navigation might shed some light! → goo.gle/3xAoObJ
Awesome initiative
Всё проверил, спасибо за связку.
Awesome ❤
Does it support .degenerate() ?
I always use this before consume real API, to test UI
Hi, can you please make a video on how we can collaborate on Firebase with Flutter! I am working on an app with my team and facing some problems.
where does StarIcon() come from please?
Its just an example,Consider it as Icon(Icons.star)
StarIcon is meant to be a generic widget used to illustrate the example. You could replace it with any other widget like a button or card.
Top level 🎚️
Usefull
Nice idea
Very cool 🤓
Great 🎉
awesome
А как закрыть этот арбитраж?
Who's the new host?
Guys, please I beg u, fix mouse wheel scroll. It's blocking whole web platform
❤
Hiii
is flutter still popular?
Why not?
more popular than react if you compare it on google trends
Sounds like AI generated voice and flutter team is on auto pilot
Is Flutter running out of widgets so we're doing "techniques" now?
Which widgets are you lacking when you have dart? Lol skill issue
Yeah, Widget of the Week could start covering third party packages too?
@@TheOrator_Ese I don't lack any widget. I'm just saying
@@mikopiko Yeah, also I actually l8ke this techniques thing I was just joking
Cant get this joke😊
Cool🎉