Generic Enum Builder

Build Status

Introduction

The package generic_enum_builder contains builders and source code generating classes based on source_gen and analyzer.

The provided builders can be configured to build GenericEnum classes supporting json-serialization.

Generic enumeration classes appear to the user like a Dart enum would. For example, generic enums can be used in switch statements, as annotations, to initialize variables, or as default parameters in functions and constructors.

Usage

To use this library include generic_enum as dependency in your pubspec.yaml file. Include generic_enum_builder and build_runner as dev_dependencies.

A step-by-step guide on how to build a generic enumeration is provided here.

Examples

The package generic_enum_example provides a complete example on how to define and build generic enumeration classes. As a starting point users could clone this repository, add their own generic enum classes to the folder lib and build the library.

Features and bugs

Please file feature requests and bugs at the issue tracker.

Libraries

generic_enum_builder
Library providing the builders mapBuilder and jsonBuilder. These functions are used to build generic enumeration classes extending GenericEnum<T>.