Dart null safety in Action
summary
Live coding in DartPad demonstrates Dart null safety syntax and tradeoffs: nullable vs non‑nullable types, the null assertion (!) operator, nullable generics, the new Required keyword, type promotion rules, and how late lazy initialization enables circular references and cached values. Examples show exact expressions to change, when runtime exceptions occur, and which analyzer errors disappear; all code runs in the workshop and links to the Null safety code lab and Flutter resources.
AI-written summary · about
chapters (14)
- 0:00Start
- 2:54Dart Null Safety
- 5:22Nullable Types
- 6:27Step Three Nullable Types with Generics and Type Parameters
- 17:41Using a Default Value
- 18:35Six Type Promotion
- 19:18Type Promotion
- 25:41Exceptions
- 26:57Object Property
- 30:06Sealed Classes
- 30:28Instantiate a String Provider
- 33:09Late Keyword
- 35:5312 Late Circular References
- 37:58Cached Value Provider
related talks
36mDart Exceptions: Best Practices
26mSound Dart
43mThe Road to Kotlintown
59mBringing C# nullability into existing code - dammit is not the answer!
01h 00mNull Safety in Spring Applications With JSpecify and NullAway
19mModern JSON Handling in a Macro-less Flutter Era
31mExploring Static Code Analysis techniques in Flutter
20mCode Quality Gates for Large-Scale Flutter Apps
