EnumWithValue class Null safety

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

Implementers
Annotations

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. [...]
read-only, override
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
value String
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent 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 ==(dynamic other) bool
True iff other is an EnumWithValue with the same value as this object.
override