OneOf6<A, B, C, D, E, F> class final

Typed union of 6 variants.

Annotations

Constructors

OneOf6.a(A value)
Wraps a value of variant A.
const
OneOf6.b(B value)
Wraps a value of variant B.
const
OneOf6.c(C value)
Wraps a value of variant C.
const
OneOf6.d(D value)
Wraps a value of variant D.
const
OneOf6.e(E value)
Wraps a value of variant E.
const
OneOf6.f(F value)
Wraps a value of variant F.
const
OneOf6.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

Operators

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

Static Methods

parse<A, B, C, D, E, F>(Object? json, {required A fromA(Object), required B fromB(Object), required C fromC(Object), required D fromD(Object), required E fromE(Object), required F fromF(Object)}) OneOf6<A, B, C, D, E, F>
Deserializes from JSON using typed parsers.