I created a public Gist of my experience touring Dart 3’s new features via their Dart Codelab. Gist files from Dart’s codelab: Dive into Dart 3’s new OO language enhancements including patterns, records, enhanced switch and case, and sealed classes. It was intriguing and educational!! 💡 A couple of the features I recall learning or using
Month: June 2023
Dart and OO: Design Patterns, Refactoring, and Code Smells
I would like to thank Refactoring.guru for their insightful course on, well, refactoring (and code smells) at an Object-Oriented (OO) level. The course helped to set me on the right track for being more cognizant of my coding practices in Flutter and Dart. While some refactoring concepts might appear self-explanatory, the dissection of the refactoring processes in
TIL — `.nonNulls`
From the source code: flutterbincachedart-sdklibcollectioniterable.dart /// Operations on iterables with nullable elements. @Since(“3.0”) extension NullableIterableExtensions<T extends Object> on Iterable<T?> { /// [Returns] The same elements as this iterable, /// except that `null` values are omitted. Iterable<T> get nonNulls => NonNullsIterable<T>(this); } dart:collection Source — changelog: https://github.com/dart-lang/sdk/blob/5d30f18892f1f825943a74e81ab02f27c2c6c26f/CHANGELOG.md#dartcollection Added extension members: nonNulls firstOrNull lastOrNull singleOrNull elementAtOrNull Obtained