Sealed Classes appear in many modern programming languages like C#, Scala, or Kotlin. In general, they allow you to create restricted class hierarchies. As a result, Sealed Classes work very well in modeling the state of your app. They make your code more reliable and less error-prone.

To start with, Sealed Classes seem to be very similar to Enum types, but they also have some additional functionalities. The main difference is that Enums can have only one instance per type. On the other hand, Sealed Classes allow you to create several instances of the same class. …

Karol Lisiewicz

Android and Flutter Developer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store