Here’s a nice simple article explaining enhanced enums that have been around for a while but may be something overlooked. Between these and sealed classes I think Dart has an excellent story for pattern matching.
Here’s a nice simple article explaining enhanced enums that have been around for a while but may be something overlooked. Between these and sealed classes I think Dart has an excellent story for pattern matching.
How exactly does freezed not support them? All data on an enhanced enum is static.
Maybe the code generator? I have no idea. It seems like there shouldn’t be an issue.
Freezed generates sealed classes, not enums.
I’m not sure enhanced enums do what you think they do if you expect freezed to generate anything for them besides what json_serializable generates for regular enums
The whole point of the discussion is that enhanced enums don’t do anything in practice.
Instead of writing verbose extensions and functions all over the place you can use enhanced enums. I mean what else are they supposed to do?