EnumFormat enum

The Enum serialization format

  • string the text of the enum item
  • indexOf the index of the enum item

Both formats have pro & cons. string

  • it is space consuming since it's the text of the item
  • you can not change the item text
  • you can add new items without warring about its position indexOf
  • it saves space since it is only a number
  • you can change the item text
  • you can not add new items without warring about its position
Inheritance

Constructors

EnumFormat()
const

Values

string → const EnumFormat
indexOf → const EnumFormat

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Constants

values → const List<EnumFormat>
A constant List of the values in this enum, in order of their declaration.