API Reference 0.3.24dart_web_toolkit_utilEnum<T>

Enum<T> abstract class

Emulation of Java Enum class.

Example:

class Meter<int> extends Enum<int> {

const Meter(int val) : super (val);

static const Meter HIGH = const Meter(100); static const Meter MIDDLE = const Meter(50); static const Meter LOW = const Meter(10); }

and usage:

assert (Meter.HIGH, 100); assert (Meter.HIGH is Meter);

abstract class Enum<T> {

 final T _value;

 const Enum(this._value);

 T get value => _value;
}

Subclasses

Alignment<String>, AnimationType<int>, BorderStyle<String>, Clear<String>, Cursor<String>, Direction<String>, Display<String>, DockLayoutConstant<int>, Float<String>, FontStyle<String>, FontWeight<String>, ListStyleType<String>, OutlineStyle<String>, Overflow<String>, Position<String>, PredefinedFormat<int>, PressedValue<int>, RepeatStyle<int>, TableLayout<String>, TextAlign<String>, TextAlignment, TextDecoration<String>, TextDirection<int>, TextJustify<String>, TextOverflow<String>, TextTransform<String>, Unit<String>, VerticalAlign<String>, Visibility<String>, WhiteSpace<String>

Constructors

const Enum(T _value) #

Creates a new Object instance.

Object instances have no meaningful state, and are only useful through their identity. An Object instance is equal to itself only.

docs inherited from Object
const Enum(this._value);

Properties

final T value #

T get value => _value;