FakeVantageScope class

A controllable VantageScope for testing a plugin without mounting a full Vantage. Mutating its state notifies listeners, like the real scope.

Inheritance
Implemented types

Constructors

FakeVantageScope({VantageSimulationData simulation = VantageSimulationData.none, bool isHudOpen = false, VantageRedactor redactor = const VantageDefaultRedactor()})

Properties

appRootElement ↔ Element?
Settable app-root handle for tests that need one.
getter/setter pairoverride-getter
captureResult ↔ VantageCapture?
Result returned by captureApp. Defaults to null, because the real host returns null wherever rasterization is unavailable — plugin code must cope.
getter/setter pair
eventBus → VantageEventBus
The host-owned merged, timestamped, ring-buffered event bus. Plugins that mix in EventSource are relayed onto it automatically; anything else can add a breadcrumb directly with scope.eventBus.add(...).
no setteroverride
exportContributors → List<ExportContributor>
Contributors the fake's buildExport collects from. Add your plugin here to exercise the real pipeline — including redaction — in a unit test.
final
hashCode → int
The hash code for this object.
no setterinherited
hasListeners → bool
Whether any listeners are currently registered.
no setterinherited
isHudOpen → bool
Whether the HUD is currently open.
no setteroverride
lastCapturePixelRatio ↔ double?
The pixelRatio passed to the most recent captureApp call.
getter/setter pair
redactor → VantageRedactor
The host redactor this fake reports. Override it to prove a plugin honours the host's rules rather than a default of its own.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
simulation → VantageSimulationData
The active simulation applied to the app.
no setteroverride
storage → VantageStorage
Always-enabled in-memory storage, so plugin tests exercise the real namespacing behavior rather than a stub.
final

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
buildExport({bool includeSensitive = false}) → Future<VantageExportBundle>
Runs an export across every registered ExportContributor, applying the host redactor to all text artifacts. includeSensitive must reflect an explicit user action — VantageSensitivity.sensitive artifacts are dropped otherwise.
override
captureApp({double pixelRatio = 1.0}) → Future<VantageCapture?>
Rasterizes the app subtree (the core-owned boundary above the app, inside the active simulation — i.e. what the user sees, without the HUD chrome).
override
closeHud() → void
Closes the HUD.
override
dispose() → void
Discards any resources used by the object.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
openHud() → void
Opens the HUD.
override
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
toggleHud() → void
Toggles the HUD open/closed.
override
toString() → String
A string representation of this object.
inherited
updateSimulation(VantageSimulationData data) → void
Replaces the active simulation. The host applies it once inside MaterialApp.
override

Operators

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