Tuple<Ta, Tb> class

Structure for holding two values of independent types.

Tuples are immutable. If tuples are checked for equality, both of the values (a and b) of the tuple are checked for equality. Tuples can be serialized with JsonEncoder.

Constructors

Tuple(Ta a, Tb b)
const

Properties

a → Ta
final
b → Tb
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() List
Enables tuples to be serialized with JsonEncoder.
toString() String
A string representation of this object.
inherited
withA(Ta value) Tuple<Ta, Tb>
withB(Tb value) Tuple<Ta, Tb>

Operators

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

Static Methods

factory<Ta, Tb>(Ta a, Tb b) Tuple<Ta, Tb>
Static factory function that acts like a constructor.