SingleUseData<T> class

A class that represents a single-use data container with generic content.

Constructors

SingleUseData(T data)
Creates a new SingleUseData instance with the given content.

Properties

hasData → bool
Checks if the content has been accessed.
no setter
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

consume() → T?
Retrieves and clears the stored content.
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