Resource class abstract

An object with a limited lifespan.

A resource must only be used while isClosed is not true. Failure to do so will result in a StateError being thrown.

While ClosableResources can be explicitly closed, resources which only implement Resource typically depend on another resource and are automatically closed when the that resource is closed.

Implementers

Constructors

Resource()

Properties

hashCode int
The hash code for this object.
no setterinherited
isClosed bool
Whether this resource has been closed.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

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