Designing with Types in Dart & Flutter โ Sum Types Tutorial
by Reso Coder youtube.com
45 min 7k views
๐ Learn from the written tutorial ๐๐ https://resocoder.com/dart-sum-types-tutorial ๐จโ๐ป Do you write good code? Find out now! https://resocoder.com/good-code-quiz Handling poorly documented edge cases is tough. Using nulls to represent "no value" and then having to check for nulls all over the place is bad. Remembering all the possible subtypes of a base class is hard. All in all, relying on you "remembering things" is a recipe for disaster. That's why you should model your domain in such a way that wrongly written code doesn't even compile. That's right, you can actually prevent many run-time crashes and get notified about errors in the code editor before hitting the run button. We're going to demonstrate all of the above by building a small part of a fake CRM (customer relationship management) responsible for sending out physical letters. We support only customers from the USA and from Canada. As you know, one component of a postal address is the state (e.g. Florida) for the US, or the province (e.g. Ontario) for Canada. It's precisely on the state or province, where you'll learn how to design with types. We will move from the most naive (and sadly common) implementation to the most robust one. The robust implementation will require us to use some sort of a sum type (a.k.a. sealed classes in Kotlin or powerful enums in Swift). Go to my website for more information, code examples, and articles: โ https://resocoder.com Follow me on social media: โ https://instagram.com/resocoder โ https://www.facebook.com/resocoder โ https://twitter.com/resocoder
More like this
Article 8 min readDemystifying responsive layout in Flutter
by
Souvik Biswas
, on Flutter Pro
Souvik Biswas
@souvikbiswas ๐ฎ๐ณ India
Available for hire
Android & Flutter Developer | Technical Writer at Medium - Flutter Community & Codemagic Blog | Udacity Secure and Private AI '19 Scholar
View Souvik on Flutter ProThere is no hard-and-fast rule for designing a responsive layout in Flutter. But there are some approaches that you can follow.
Read on medium.com- Article 4 min read
Flutter with Streams and RxDart
FlutterLDN community cast. Brian Egan: Interested in Flutter, but unsure how to structure Flutter apps? If so, join along as we explore how to architect apps...
Read on skillsmatter.com - Article 4 min read
Flutter + NVIDIA Jetson: Designing a Low-Latency Robotics Gateway
by vmodal_ai
Flutter + NVIDIA Jetson: Designing a Low-Latency Robotics Gateway This advanced tutorial treats Flutter as the operator-facing presentation layer while wearable SDKs, Jetson services, ROS 2 nodes, and...
Read on dev.to - Article 1 min read
Designing for Accessibility in Flutter: A Practical Guide
by Muhammad Uzair
Designing for Accessibility in Flutter: A Practical Guide As mobile engineers, we often get caught up in building pixel-perfect UIs and buttery-smooth animations. But if those UIs can't be used by som...
Read on dev.to