Dart Null Safety: The Ultimate Guide to Non-Nullable Types
Vložit
- čas přidán 28. 07. 2024
- Written tutorial here: 👇👇
codewithandrea.com/videos/202...
A complete tour of Null Safety & non-nullable types, the syntax changes they introduce in Dart 2.9, and how to use them in practice.
HIGHLIGHTS
00:00 - Intro
01:23 - Null References: Some History
01:53 - Dart: Sound Type System
03:19 - Null Safety: Intro & Non-Nullable variables
03:53 - Null Safety: Advantages
05:00 - Nullable Variables
06:43 - The Assertion Operator
08:17 - Flow Analysis: Null Checks & Promotion
10:25 - Flow Analysis: Definite Assignment
11:12 - Using non-nullable variables with classes
11:33 - Non-nullable named and positional arguments
13:47 - Null-aware cascade operator
14:37 - Null-aware subscript operator
14:53 - The late keyword
17:01 - Static and global variables
17:29 - Conclusion
Join my FREE email course to become a Flutter expert with the best resources, at your own pace: codewithandrea.com/newsletter/
Want more? Check out all my Flutter courses: 👇👇
codewithandrea.com/courses/
Happy coding! - Věda a technologie
Great video. I just can't understand why any strongly typed language is not null safe. This is a giant step for dart
Thank you so much for your tutorials. May God bless you. Your courses are awesome.
This would help avoid soooooo many potential errors! Thanks for this video and perfect explanation and examples
Best Video on Null Safety. Watched many video, null checks weren't clear on docs. But you made it so simple. Thanks Andrea
Thank you so much. This was an epic tutorial. So concise and every minute had value.
Day 2, I've learned something new: Null safety. Thank you Andrea
Very helpful, thanks!
Wow really an amazing explanation thanks :D
Thanks a lot Andrea ❤
Great Video ❤
I was struggling this null safety concept as I am new to flutter. Thank you.
thankyou so so so much
Thank you sir
Well explained
thank you
thanks I love u
Hey Andrea, being your follower for around an year. Havent known any credible person to ask this question.
Can you make a video about the future of Flutter especially with regards to the plugin development?
Will flutter collapse if there is not enough plungin development for the native features?
I don’t think that’s a problem, plugin development has accelerated considerably from 2018 to 2019. If anything, there are already so many plugins that finding and highlighting good quality ones is one area of focus these days.
Andarea in ur Flutter course we create a time tracker in this.child and many more is give's error I added ? in some places and before this.child I added require but still in super function give me error is quit confusing i cant understand what to do
OMG here they come...
Hello Andrea! Can you spare a minute to answer my query please. As part of a project, I have to implement a chat feature in a flutter app with firebase backend. The users should be able to send documents and images through chat. As a proof of concept, I have implemented something similar by using firebase streams i.e. by using the snapshots method to listen to document or collection changes in real time. I want to know if this is a production grade technique. I have heard that sockets are a more proper way. Can you point me to some tutorial and share your ideas and experience. Thank you!
Interested, if you have any update on this subject I would like to know.
Are you planning to create any new course in udemy for flutter?
Yes, new announcements coming soon.
'late' it mean bye bye setState() and await?
No. You still need setState to rebuild widgets, and await for asynchronous code. late is only for deferring initialization of variables, without having to make them nullable.
@@CodeWithAndrea Ohh.. with setState() I was thinking about initState() 🙈 I didn't notice how I wrote it 😀
i will miss my huge list of assertions :(
Hi! I sent you an email regarding a bug from one of your github packages.
it's impossible to listen it, he sounds like a robot
Bad accent not easy for me 😡