Dart Extensions are what I’ve been waiting for

Dart doesn't allow Enums with values, but with extensions that's now possible. void main() { Status stat = Status.running; print( "what is the status value? " + stat.value.toString() ); // output = 2 } enum Status { none, running, stopped, paused } extension StatusInt on Status { int get value { switch( this ) { case Status.none: return 0; case Status.paused: return 1; case Status.running:...