You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm a bit torn on this feature - I think the syntactic sugar would be a very nice addition, as the alternative for sealed classes is quite verbose.
I'm not sure though if we should generate the map, maybeMap etc. As of Dart 3.0, the necessity for these methods is questionable, as pattern matching & sealed classes exists now. If we include it, it will definetly be an opt in feature.
I personally don't see a need for map, maybeMap, maybeWhen... freezed is already going away from those. But being able to generate sealed classes and unions with the freezed syntax would be huge.
That example is from an older project I started working on recently, I honestly don't even know if all that generated code is really necessary or if just a piece of it should be enough.
Interesting, I was not familiar with sealed classes. That may actually work, but I need to test it.
Today we use freezed to generate some class methods like this:
and freezed outputs:
Is it possible to use genq to do the same?
The text was updated successfully, but these errors were encountered: