Skip to main content


Showing posts from December, 2014

New site for Dart news and articles

For the latest Dart news, visit our new blog at .

Enums and Async primitives in Dart

Support for enums, async, and deferred loading are now officially part of the 2nd revision of the Ecma-408 standard , the Dart Programming Language Specification. The second revision was approved last week at the Ecma General Assembly. You can find more information about using the new features in our language tour on Enumerations ( enum )  Asynchrony ( async , await , and more) Deferred loading ( import ... deferred as ) Enums Enums help developers express clear intent with minimal code, and help tools catch potential bugs. Here is an example of an enumeration of form states:      enum FormState { OPEN, INPROGRESS, CLOSED } Tools can even warn developers if they omit an enum value from a switch statement, which helps identify potential bugs. Async Dart has always had strong support for asynchronous programming, with core library features such as Future and Stream . Now, with the new language primitives async  and await , asynchronous code