DisposeScope class

Groups many Disposes together and allows for disposing of all of them at once.

Disposes are disposed synchronously in the LIFO order.

Available Extensions

Constructors

DisposeScope()

Properties

disposed bool
Whether dispose was called on this dispose scope.
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

addDispose(Dispose dispose) → void
Adds this dispose to this DisposeScope's internal list of Disposes.
dispose() Future<void>
Disposes all added Disposes.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
run(FutureOr<void> block(DisposeScope scope)) Future<void>
Calls block only if this dispose scope is not yet disposed. Otherwise, it's a no-op.
toString() String
A string representation of this object.
inherited

Operators

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