DVCancellation class final

A request to stop, which a caller or an owner's lifecycle can make.

One token may be handed to several runs; cancelling it cancels all of them. Cancelling twice keeps the first reason.

Constructors

DVCancellation()

Properties

hashCode → int
The hash code for this object.
no setterinherited
isCancelled → bool
no setter
reason → String?
Why, when it was said.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
whenCancelled → Future<void>
Completes when the token is cancelled.
no setter

Methods

cancel([String? reason]) → void
dispose() → void
Stops watching an owner without cancelling.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onCancel(void listener()) → void Function()
Registers listener; returns a function that removes it.
toString() → String
A string representation of this object.
inherited

Operators

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

Static Methods

until<T>(DVLifecycleSignal<T> owner, bool ended(T state)) → DVCancellation
A token that cancels itself when owner reaches a state ended accepts -- a page disposing, a request completing, the app shutting down -- so a result is never delivered to something that is gone.