EnumWithValue class abstract

A Json encodable class that mimics an enum, but with a String value that is used for serialization.

Implementers
Annotations
  • @immutable

Constructors

EnumWithValue(String? value)
The value will be used when toJson or toString will be called. It will also be used to check if two EnumWithValue are equal.
const

Properties

hashCode int
The hash code for this object.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value String?
final

Methods

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

Operators

operator ==(Object other) bool
True iff other is an EnumWithValue with the same value as this object.
override