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 19 min read
Dart 2.3.0
The Dart SDK, including the VM, dart2js, core libraries, and more.
Read on github.com
Article 19 min readDart vs Swift: a comparison
by
Andrea Bizzotto
, on Flutter Pro
Andrea Bizzotto
@andreabizzotto ๐ฌ๐ง United Kingdom
Available for hire
Andrea Bizzotto has extensive experience in mobile app development, having built complex apps for various clients and as an independent developer. He is passion...
View Andrea on Flutter ProDart and Swift are my two favourite programming languages. I have used them extensively in commercial and open-source code.
Read on medium.com