What are the benefits of built_value enums over normal enums from the language What are the benefits of built_value enums over normal enums from the language dart dart

What are the benefits of built_value enums over normal enums from the language


Serialization is one thing; the other major one is that they are proper classes: you can add code to them, and they can implement interfaces.

In this way they're much like Java's enums.


Mostly that they can easily be de/serialized from/to JSON.

Darts built-in enums are quite a bad fit where serialization is needed.