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.

You are viewing a single thread.
View all comments View context
0 points

How exactly does freezed not support them? All data on an enhanced enum is static.

permalink
report
parent
reply
0 points

Freezed generates sealed classes, not enums.

permalink
report
parent
reply
0 points

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

permalink
report
parent
reply
0 points

The whole point of the discussion is that enhanced enums don’t do anything in practice.

permalink
report
parent
reply

Flutter

!flutter@programming.dev

Create post

Flutter and the related logo are trademarks of Google LLC. We are not endorsed by or affiliated with Google LLC

Community stats

  • 7

    Monthly active users

  • 9

    Posts

  • 7

    Comments