OneOf4<A, B, C, D> class
final
Constructors
-
OneOf4.a(A value)
-
Wraps a value of variant A.
const
-
OneOf4.b(B value)
-
Wraps a value of variant B.
const
-
OneOf4.c(C value)
-
Wraps a value of variant C.
const
-
OneOf4.d(D value)
-
Wraps a value of variant D.
const
-
OneOf4.from(Object? value)
-
Wraps a typed value, matching by runtime type.
factory
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
→ Object?
-
The wrapped value.
final
Methods
-
noSuchMethod(Invocation invocation)
→ dynamic
-
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson()
→ Object?
-
Serializes to JSON. Primitives pass through; objects use
toJson().
-
toString()
→ String
-
A string representation of this object.
override
Static Methods
-
parse<A, B, C, D>(Object? json, {required A fromA(Object?), required B fromB(Object?), required C fromC(Object?), required D fromD(Object?)})
→ OneOf4<A, B, C, D>
-
Deserializes from JSON using typed parsers.