OneOf class abstract

Implementers

Constructors

OneOf()

Properties

hashCode int
The hash code for this object.
no setteroverride
isNull bool
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
typeIndex int
determines where the value type is in the types field
no setter
types List<Type>
all available types to choose from
no setter
value Object?
the actual value, accepts null
no setter
valueType Type
exact value type
no setter

Methods

isTX(int index) bool
checks if typeIndex is equal to input index
isType(Type t) bool
checks if valueType is equal to input type
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
returns value.toString()
override

Operators

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

Static Methods

fromValue1<T0>({required T0 value}) OneOf1<T0>
fromValue2<T0, T1>({required Object? value, int? typeIndex, Type? type}) OneOf2<T0, T1>
fromValue3<T0, T1, T2>({required Object? value, int? typeIndex, Type? type}) OneOf3<T0, T1, T2>
fromValue4<T0, T1, T2, T3>({required Object? value, int? typeIndex, Type? type}) OneOf4<T0, T1, T2, T3>
fromValue5<T0, T1, T2, T3, T4>({required Object? value, int? typeIndex, Type? type}) OneOf5<T0, T1, T2, T3, T4>
fromValue6<T0, T1, T2, T3, T4, T5>({required Object? value, int? typeIndex, Type? type}) OneOf6<T0, T1, T2, T3, T4, T5>
fromValue7<T0, T1, T2, T3, T4, T5, T6>({required Object? value, int? typeIndex, Type? type}) OneOf7<T0, T1, T2, T3, T4, T5, T6>