Top 16 Dart Tips and Tricks Every Flutter Developer Should Know
HTML-код
- Опубликовано: 30 июл 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! Наука
This is a gem 💙💎
Thanks a lot. I’m a fan of your channel, so it’s great to hear this.
Oh hi paras
You got me watching the whole video. Thumbs up 👍
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.
This is a masterpiece!
Thanks for sharing Andrea
So, so good! Thanks!
Great content! 💯
The chaptering really helps. 👍
Love this. Awesome content.
Thank you. I'm definitely purchasing the course.
Useful, thanks!
Great Video. Keep it up Andrea.
great tips, many thanks
Thanks for sharing!
GOLD!!! THIS IS GOLD!!!
This information is gold ❣️
thanks for the video brother :)
Absolute gold.
Coooool!!!! Thanks!!!'❤
I bought your dart course from Udemy... and i am practicing... thanks you
Very informative video!
Best flutter channel in RUclips!🤩
Excellent! 👍
Great video thanks
Awesome!
Professional 🔥
thanks for the tips
nice ... very informative
Great tips
I learned a lot
Excellent 👍 👍 👍
Sou do brasil nao sei falar ingles, mas meu parabens. Deu para entender algumas coisas
Amazing
awesome
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
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.
Did you show ur localhost as https how? Adding self signed ssl? To the vhost?
1:50 same thing in python __call__ method,👍
I knew about some of these and I felt less newbie lop
cool
Hi Andrea sir can you suggest some interesting college project using flutter.
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