this post was submitted on 04 Oct 2023
1 points (66.7% liked)

Flutter

527 readers
1 users here now

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

founded 1 year ago
MODERATORS
 

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 comment's thread
view the rest of the comments
[โ€“] [email protected] 1 points 11 months ago (1 children)

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

[โ€“] [email protected] 1 points 11 months ago

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?