This a set of samples that demonstrates the enhanced enums syntax and shows some common use cases of the feature.
This feature is part of Dart 2.17. The programs in this folder won't compile in earlier versions.
Read the source code in the lib/
directory. The code is split into
separate files according to topics or use cases. For instance,
lin/comparable_mixin.dart
demonstrates how a mixin can be used to add
extra functionality to an enum.
In lib/complete_example.dart
you will find a complete example
using all the functionality from enhanced enums.
In test/
you will find unit tests showing how the enums from the examples
can be used.