Top 16 Dart Tips and Tricks Every Flutter Developer Should Know
Вставка
- Опубліковано 21 лип 2024
- Written tutorial here: 👇👇
codewithandrea.com/videos/top...
In this tutorial I share 16 Dart top tips that will improve your coding style as a Flutter developer.
You can use them to write more concise and effective code, and make the most of the Dart language.
CONTENTS
00:00 - Intro
00:22 - 1. Dart supports string multiplication.
01:03 - 2. Use Future.wait to execute multiple Futures concurrently
01:32 - 3. Dart callable classes
01:57 - 4. How to invoke nullable callbacks
02:33 - 5. Using anonymous functions and functions as arguments
03:36 - 6. You can use collection-if and spreads with lists, sets AND maps
04:06 - 7. Iterating through a map in a null-safe manner?
04:36 - 8. Use named constructors and initializer lists for more ergonomic APIs.
05:16 - 9. Getters and setters
05:51 - 10. Use underscores for unused function arguments
06:16 - 11. Singletons and private constructors
06:58 - 12. Need a collection of unique items? Use a Set rather than a List.
07:42 - 13. How to use try, on, catch, rethrow, finally
08:27 - 14. Common Future constructors
09:05 - 15. Common Stream constructors
09:57 - 16. Sync and Async Generators
10:46 - Wrap Up
Complete Dart Course (with discounted price): nnbd.me/dart
Join my FREE email course to become a Flutter expert with the best resources, at your own pace: codewithandrea.com/newsletter/
Happy coding! - Наука та технологія
You got me watching the whole video. Thumbs up 👍
This is a gem 💙💎
Thanks a lot. I’m a fan of your channel, so it’s great to hear this.
Oh hi paras
Woah man that was pretty good and consise demonstration of dart ... I learnt a lot of good stuff today!
This is amazing! They are all very useful. 6 of them where at least partially new to me.
Thank you. I'm definitely purchasing the course.
Thanks for sharing Andrea
This is a masterpiece!
I bought your dart course from Udemy... and i am practicing... thanks you
Great Video. Keep it up Andrea.
Thanks for sharing!
Best flutter channel in UA-cam!🤩
Great content! 💯
Love this. Awesome content.
So, so good! Thanks!
Useful, thanks!
Awesome!
great tips, many thanks
This information is gold ❣️
The chaptering really helps. 👍
GOLD!!! THIS IS GOLD!!!
Very informative video!
Excellent! 👍
thanks for the video brother :)
Absolute gold.
Great video thanks
Coooool!!!! Thanks!!!'❤
nice ... very informative
Professional 🔥
Excellent 👍 👍 👍
What a coincidence I just had to show data from the map in UI and I was spitting each entry manually suddenly map iteration part comes and I used it instead Thank You, Creator.
Great tips
thanks for the tips
Sou do brasil nao sei falar ingles, mas meu parabens. Deu para entender algumas coisas
I learned a lot
Amazing
Did you show ur localhost as https how? Adding self signed ssl? To the vhost?
awesome
great
Nice video!
What shortcut do you use in VS Code to quick import files from the same directory?
I guess he is just pressing the Undo shortcut to show the code he is explaining.
Hi Andrea sir can you suggest some interesting college project using flutter.
1:50 same thing in python __call__ method,👍
I knew about some of these and I felt less newbie lop
cool
Unfortunately Tip #2 is wrong, Future.wait didn't run Futures concurrently, it just run them sequentially in current isolate/event loop, and give you all result after every Future is finished. If you want real concurrency, you should spawn new isolates.
For example:
void main() async {
await Future.wait([
Future(() { for (int i = 0; i < 5; i++) { print(i); } }),
Future(() { for (int i = 0; i < 5; i++) { print(i); } }),
Future(() { for (int i = 0; i < 5; i++) { print(i); } }),
]);
}
It'll print 1,2,3,4,5,1,2,3,4,5,1,2,3,4,5, instead of 1,1,1,2,2,2....
Thanks for informing!
Like first 💓
thought this was about the sport
Haha
plz build a little vpn plz
It was too fast. I could not understand few of them.
.
One year of my experience in 12 minutes