enum States { @SerializationValue('AL') Alabama, @SerializationValue('AK') Alaska,
...}
This causes an analyzer error "An enum must declare at least one constant name". Additionally I see https://code.google.com/p/dart/issues/detail?id=22178#c4 which says adding metadata to enum values is currently disallowed in the spec. So I'm curious why this is the case.
--
For other discussions, see https://groups.google.com/a/dartlang.org/
For HOWTO questions, visit http://stackoverflow.com/tags/dart
To file a bug report or feature request, go to http://www.dartbug.com/new
To unsubscribe from this group and stop receiving emails from it, send an email to misc+uns...@dartlang.org.
I continue to do all my enums as const classes. I find the enum support in Dart too simple for all but the most basic cases.