enum_class 2.0.0

  • README.md
  • Installing
  • Versions
  • 0

Enum Classes for Dart

Enum Classes are now available from built_value.



  • Deleted. Equivalent functionality is now available from built_value.


  • Regenerate .g.dart files for built_value 0.1.6.


  • Allow quiver 0.23.


  • Upgrade analyzer, build and source_gen dependencies.


  • API now stable.
  • Refactor generator to split into logical classes.
  • Fix "watch mode": check for duplicate identifiers per library.


  • Improve error output on failure to generate.


  • Add values and valueOf to generated mixin for use in Angular templates.
  • Make duplicate generated name detection more robust.
  • Check value and valueOf using analyzed nodes instead of raw source. Makes generation robust to newlines in these declarations.


  • Add mixin generation for use with Angular templates.


  • Upgrade to source_gen 0.5.0.
  • Breaking change; see example for required changes to build.dart.


  • Check for missing import statement.
  • Fix constraints for source_gen.


  • Fix generation across multiple files, allow reuse of generated identifiers.


  • Fail on dynamic fields.
  • Export BuiltSet.
  • Allow part statements with double quote.


  • Support multiple enums in one file by allowing arbitrary generated identifiers.


  • Add accurate dependencies on SDK, analyzer.


  • Generator, tests and example.

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  enum_class: ^2.0.0

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter packages get

Alternatively, your editor might support pub get or flutter packages get. Check the docs for your editor to learn more.

Version Uploaded Documentation Archive
2.0.0 Nov 22, 2016 Go to the documentation of enum_class 2.0.0 Download enum_class 2.0.0 archive
1.1.2 Nov 14, 2016 Go to the documentation of enum_class 1.1.2 Download enum_class 1.1.2 archive
1.1.1 Oct 19, 2016 Go to the documentation of enum_class 1.1.1 Download enum_class 1.1.1 archive
1.1.0 Sep 21, 2016 Go to the documentation of enum_class 1.1.0 Download enum_class 1.1.0 archive
1.0.0 Jul 11, 2016 Go to the documentation of enum_class 1.0.0 Download enum_class 1.0.0 archive
0.2.2 Jun 7, 2016 Go to the documentation of enum_class 0.2.2 Download enum_class 0.2.2 archive
0.2.1 Jun 6, 2016 Go to the documentation of enum_class 0.2.1 Download enum_class 0.2.1 archive
0.2.0 May 30, 2016 Go to the documentation of enum_class 0.2.0 Download enum_class 0.2.0 archive
0.1.0 May 25, 2016 Go to the documentation of enum_class 0.1.0 Download enum_class 0.1.0 archive
0.0.6 Oct 23, 2015 Go to the documentation of enum_class 0.0.6 Download enum_class 0.0.6 archive

All 15 versions...

Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

The package version is not analyzed, because it does not support Dart 2. Until this is resolved, the package will receive a health and maintenance score of 0.

Maintenance issues and suggestions

Add SDK constraint in pubspec.yaml. (-50 points)

For information about setting SDK constraint, please see https://www.dartlang.org/tools/pub/pubspec#sdk-constraints.

Package is too old. (-100 points)

The package was released more than two years ago.

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package. Common file name patterns include: main.dart, example.dart or you could also use enum_class.dart.