Annotation<T> class

Annotations are tagged values that are used to add metadata to transactions in an extensible way.

They should be used to model things that affect the entire transaction (such as its Transaction.time or information about its Transaction.userEvent). For effects that happen alongside the other changes made by the transaction, StateEffect is more appropriate.

Annotations

Constructors

Annotation(AnnotationType<T> type, T value)
@internal
const

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
type AnnotationType<T>
The annotation type.
final
value → T
The value of this annotation.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

define<T>() AnnotationType<T>
Define a new type of annotation.