generic_enum_example 0.1.3 generic_enum_example: ^0.1.3 copied to clipboard
Demonstrates how to define and build generic enumeration classes using the library generic_enum.
Generic Enum Example #
Introduction #
GenericEnum is a base class for creating generic classes with a fixed set of static constant instances. These classes appear to the user like a Dart enum would. For example, generic enums can be used in switch statements, to initialize variables, or as default parameters in functions and constructors.
This library demonstrates how to define and build generic enumeration classes.
Starting Point #
This package provides complete examples 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. Build instructions
are provided below.
Usage #
To use this library include generic_enum and generic_enum_annotation as dependency in your pubspec.yaml file. Include generic_enum_builder, source_gen, build_runner as dev_dependencies.
A step-by-step guide on how to build a generic enumeration is provided here.
Features and bugs #
Please file feature requests and bugs at the issue tracker.