Time for an update on My Leaf! This time it’s all about null safety! For users of My Leaf this update has little value… but for me as a developer it is an big update! As you may know the 2.12 release of Dart introduced sound null safety. What this means is that Dart at compile time (and at runtime with the new
late keyword) checks for null values. This means you now have to declare whether a variable can be nullable or not. This changes a lot and it make you think twice about nullable declarations. It sounds simple but it definitely makes you think about null values and the rational behind having nullable declarations and variables. At first it seems like a hassle but it definitely makes for safer code and programming in the end.
How does this affect My Leaf? Well… it affects My Leaf and all of its dependencies. Luckily the third party dependencies My Leaf uses all have converted to null safety; besides one library I used for in-app purchases. I now use the officially supported package for in-app purchases. My Leaf and its components/libraries are all now converted to null safety. I will release a new version of My Leaf soon! There will be no visible changes for existing users but lots of changes under the hood!
I invite you to peek at the source code if you desire so!
The next big thing is to do some maintenance of My Leaf! There is room for improvements in both readability and the overall quality of code + some extra features!
Links and references;