📗 Learn from the written tutorial 👇👇
resocoder.com/...
👨💻 Do you write good code? Find out now!
resocoder.com/...
The 'is' operator is a powerful thing. Checking for a subtype of an object is used in many areas, for example in state management with BLoC or Redux. Think about all those events and states. How many times have you forgotten to check for a particular type in an if or a switch statement? There is simply no way, outside of juggling all those different classes in your head, to make sure that every type is being checked for.
Not anymore! There actually is a way to make you never forget about checking for a certain type. While many other languages have this feature built into them (come on Dart!), for us, Dart developers there is a package for it - sealed_unions.
Go to my website for more information, code examples, and articles:
● resocoder.com
Follow me on social media:
● / resocoder
● / resocoder
● / resocoder
26 авг 2024