I have spent a significant amount of time writing this article, where I explain Union Types (Tagged and Untagged) and will explore the problems and solutions with them from different languages’ points of view and also, what Dart offers and how you can tackle them in Dart for your next Flutter project.
I hope you will enjoy this article and it helps you understand this topic better. I will also be happy to receive your feedback on how to improve.
Thanks for reading in advance.
Link to article: Demystifying Union Types in Dart, Tagged vs. Untagged, Once and For All | DCM - Code Quality Tool for Flutter Developers