Are there any sealed classes alternatives in Dart 2.0? : <p>I have Android development background and I'm learning Flutter.</p>

<p>In Android it's a common practice to use Kotlin sealed classes to return a state from ViewModel e.g.</p>

<pre><code>sealed class MyState {
    data class Success(val data: List&lt;MyObject&gt;) : MyState()
    data class Error(val error: String) : MyState()
}
</code></pre>

<p>I want to use similar patter in Flutter and return a State object from the BLOC class. What is the best way to achieve the same in Flutter?</p>
