AutoClosable class abstract
Represents entities which able to (and should be) close 'Close' means different cases of termination: cancel, unsubscribe, dispose etc
See also:
package:autoclose/closer/closer#Closer.addClosable
: Method to add closable entity to handle its closing whenpackage:autoclose/closer/closer#Closer.onClose
called
- Implementers
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isClosed → bool?
-
Whether the object is already closed.
null
means you can't extract such information. For example: Flutter's ChangeNotifier doesn't tell you if he was disposedno setter - onClose → void Function()?
-
A callback function that can be provided to perform custom actions when
the associated entity is closed. This function is executed after close
is called. If close is Future, then it will be awaited and called onClose.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
close(
) → FutureOr< void> - Closes the current instance. The returned future completes when the instance has been closed.
-
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