SerdeType class
Serialization and deserialization utility type for constant values
Useful primarily for code generators which need to access annotation values in the build process.
- Implementers
- Annotations
-
- @immutable
Constructors
-
SerdeType.enumV(List<
Object?> values) -
constfactory
- SerdeType.late(SerdeType func())
-
constfactory
- SerdeType.list(SerdeType generic)
-
constfactory
- SerdeType.map(SerdeType genericKey, SerdeType genericValue)
-
constfactory
-
SerdeType.nested(Map<
String, SerdeType> props) -
constfactory
- SerdeType.option(SerdeType generic)
-
constfactory
- SerdeType.set(SerdeType generic)
-
constfactory
-
SerdeType.union(String discriminator, Map<
String, SerdeType> variants) -
constfactory
-
SerdeType.unionType(Set<
SerdeType> variants) -
constfactory
Properties
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
override
-
when<
T> ({required T bool(), required T int(), required T num(), required T str(), required T option(SerdeTypeOption), required T duration(), required T list(SerdeTypeList), required T set(SerdeTypeSet), required T map(SerdeTypeMap), required T function(), required T nested(SerdeTypeNested), required T union(SerdeTypeUnion), required T unionType(SerdeTypeUnionType), required T enumV(SerdeTypeEnum< Object?> ), required T dynamic(), required T late(SerdeTypeLate)}) → T -
whenMaybe<
T> ({T bool()?, T int()?, T num()?, T str()?, T option(SerdeTypeOption)?, T duration()?, T list(SerdeTypeList)?, T set(SerdeTypeSet)?, T map(SerdeTypeMap)?, T function()?, T nested(SerdeTypeNested)?, T union(SerdeTypeUnion)?, T unionType(SerdeTypeUnionType)?, T enumV(SerdeTypeEnum< Object?> )?, T dynamic()?, T late(SerdeTypeLate)?, required T orElse()}) → T
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited