BackendRegistration class final

What registerBackendOpener hands back, so a registration can be taken off again.

It exists because a registry with no way out is a registry that leaks across tests. An application registers its backends once at startup and never wants this. A test does: very_good test runs an entire package's suite in one process, so a backend registered by one test file is still registered for every file after it — and a fake that draws nothing, registered to keep a widget test off the software rasteriser, silently becomes the backend a later test's picture is drawn with. That is a green test asserting on an empty frame, which is the worst kind.

Idempotent: calling undo twice removes one registration, not two, and removing one that something else already replaced does nothing.

Properties

asFallback → bool
Whether this took the single fallback slot rather than joining the preferred list.
final
hashCode → int
The hash code for this object.
no setterinherited
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
undo() → void

Operators

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