Disposable mixin

A Disposable holds resources such as sockets and streams that need to be manually disposed.

Using a Disposable after it has been disposed is undefined behaviour.

Motivation

This is in lieu of Dart not providing a standardized Disposable interface for the foreseeable future, https://github.com/dart-lang/sdk/issues/43490.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

dispose() → void
Disposes the held resources.
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