AppSession class

Everything one attachment owns: the VM runtime, the device backend, the perception pipeline, app logs, reconnect and lifecycle watchers. A GlintSession pools several of these and delegates to the active one.

Properties

activeRecording ↔ ScreenRecording?
A recording in flight (set by the record tool); stopped on dispose so a crash mid-record does not orphan the simctl/adb process.
getter/setter pair
alerts → Stream<AppAlert>
What this app reports on its own: new errors and overflows, failed HTTP requests while httpFailures is held, and its connection dropping, coming back or ending.
no setter
appLogs → AppLogBuffer
final
attachedAt → DateTime
final
backend ↔ InteractionBackend
getter/setter pair
breakpoints → LogBreakpoints
Log breakpoints armed on this app; they pause its UI isolate when a log line matches.
latefinal
bundleId ↔ String?
getter/setter pair
buttonEnricher ↔ ButtonFactsEnricher?
getter/setter pair
captures → CaptureRing
Background screenshots of this device, newest first.
final
captureSettleMs ↔ int
Wait after a lifecycle change before capturing, so the surface settles.
getter/setter pair
device → DeviceTarget
final
deviceMode → bool
final
deviceName ↔ String?
getter/setter pair
displayName ↔ String?
getter/setter pair
errors ↔ FlutterErrorFeed
The errors this app reported since attach.
latefinal
flagEnricher ↔ SemanticsFlagEnricher?
getter/setter pair
hasDrawnFrame ↔ bool
Whether a scene read has ever found a drawn widget tree, which tells a busy app from one that has not started.
getter/setter pair
hashCode → int
The hash code for this object.
no setterinherited
httpFailures → HttpFailureMonitor
Polls this app's dart:io HTTP profile for failed requests; idle until a watch holds it.
latefinal
iconEnricher ↔ IconEnricher?
getter/setter pair
id → String
no setter
imageEnricher ↔ ImageEnricher?
getter/setter pair
inertEnricher ↔ InertEnricher?
getter/setter pair
inputEnricher ↔ InputEnricher?
getter/setter pair
inputSetup ↔ String?
The input setup line attach judged (OS, Xcode, macOS, backend and verified status), for issue reports.
getter/setter pair
inspector ↔ InspectorClient?
getter/setter pair
interactor ↔ Interactor?
getter/setter pair
isLive → bool
A live VM (or a device-mode binding, which has nothing to lose).
no setter
label → String
Best human label for this attachment.
no setter
lastHintSignature ↔ String?
Screen signature the last developer hint was issued for (one per screen).
getter/setter pair
lastLifecycle ↔ String?
Last lifecycle value the poll saw (resumed, inactive, paused, …).
getter/setter pair
linkEnricher ↔ LinkEnricher?
getter/setter pair
mapEnricher ↔ MapEnricher?
getter/setter pair
nativeReader ↔ NativeReader?
getter/setter pair
nativeRunner ↔ XcTestRunner?
A runner started for reads only (input stays on the configured backend); null until it is up, or when switched off.
getter/setter pair
nativeRunnerNote ↔ String?
Why native reads still use the bridge's reader: the runner is starting, or why it failed; null when it is in use or off.
getter/setter pair
nativeSurfaceName ↔ String?
The foreign window in front of the app at the last check (Android, iOS simulator), e.g. a system photo picker.
getter/setter pair
getter/setter pair
observeOnly ↔ bool
Attached for reading only: tools that change the app or its device are refused.
getter/setter pair
opaqueEnricher ↔ OpaqueWidgetEnricher?
getter/setter pair
osVersion ↔ String?
getter/setter pair
overlayEnricher ↔ OverlayEnricher?
getter/setter pair
package ↔ String?
Identity filled in by attach once known; used for routing by name.
getter/setter pair
pagedEnricher ↔ PagedViewportEnricher?
getter/setter pair
platform → DevicePlatform
no setter
projectDir ↔ String?
Flutter project root behind the app, when attach could resolve it.
getter/setter pair
reader ↔ SceneReader?
getter/setter pair
readinessGate ↔ ReadinessGate?
getter/setter pair
recheckViewports ↔ bool
Set by a reload or restart: the next full get_scene checks for blank scrollables once even with no new error.
getter/setter pair
reconnectCount ↔ int
getter/setter pair
resolver ↔ CoordinateResolver?
getter/setter pair
runtime ↔ FlutterRuntime?
getter/setter pair
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sceneErrorSeq ↔ int
Error feed seq the last full get_scene reported up to.
getter/setter pair
sceneMode ↔ SceneMode
getter/setter pair
semanticizer ↔ Semanticizer?
getter/setter pair
settleDetector ↔ SettleDetector?
getter/setter pair
showTouches ↔ bool
Whether the app draws each touch; carried into every agent this app gets (reconnect, hot restart).
getter/setter pair
tabEnricher ↔ TabLabelEnricher?
getter/setter pair
toggleEnricher ↔ ToggleEnricher?
getter/setter pair
touchLog → TouchLog
Every touch glint sent to this app's device, for drawing onto recordings.
final
vmUri → Uri?
final

Methods

adoptNativeRunner(XcTestRunner runner, {double? pixelsPerPoint}) → void
Reads native UI through runner from now on; in device mode pixelsPerPoint maps its points to screenshot pixels.
captureNow(String trigger, {bool cancelled()?}) → Future<Capture?>
Screenshot this device into the ring. Null on failure; never throws, and nothing is recorded when cancelled is true once the shot is taken.
dispose() → Future<void>
dropNativeRunner() → void
Back to the bridge's reader, for a runner switched off after an earlier attach.
followRestartedIsolate() → Future<void>
Installs the in-app agent in a restarted app's new isolate and reads its lifecycle; polls instead when that fails.
matches(String query) → bool
True when query names this session: device id, app identity, or a case-insensitive prefix of the app or device name.
nativeCrashes() → Future<List<NativeCrash>>
Native crashes of this app since attach: the simulator's crash reports on iOS, the crash log buffer on Android.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notResumed() → Future<String?>
The lifecycle when the app is not resumed, so a read that waits on frames cannot finish; null when it is resumed or unknown.
readNativeSurface({String? shot}) → Future<NativeSurface?>
The native surface over the app as data, reusing shot when the reader works from screenshots; null when it cannot be read in surfaceReadTimeout or says nothing.
refreshSceneMode() → Future<void>
Re-read the lifecycle now instead of waiting for the next poll tick, so a read right after a native dialog closes does not report a stale mode.
setShowTouches(bool on) → Future<TouchesOutcome>
Shows or hides a dot for each touch inside the app; never throws.
takeLifecycleWarning() → String?
The one-time warning for a streak of unexplained lifecycle check failures; null when there is none to report.
toJson({bool active = false}) → Map<String, Object?>
toString() → String
A string representation of this object.
inherited

Operators

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

Static Methods

bindDevice({required DeviceTarget device}) → AppSession
Bind an OS-level device with no Flutter VM (screenshots + coordinates); an iOS simulator with a runner also reads the native screen.
connect({required Uri vmUri, required DeviceTarget device, required FlutterRuntime runtimeFactory(), int appLogCapacity = 500, bool showTouches = false, AppLogBuffer? appLogs}) → Future<AppSession>
Connect a Flutter-mode session: attach the VM and build the pipeline.

Constants

coveredProbeTimeout → const Duration
The agent's lifecycle answer needs no compile, so before routing input on a covered app it gets this long; silence counts as covered, and a wrong guess only sends the touch through the device.
lifecycleFailureLimit → const int
Failed checks in a row before the agent is told the lifecycle may be stale.
lifecycleProbeTimeout → const Duration
A suspended app (device locked, backgrounded) never answers; a live one answers well inside this.
pausedEvidenceInterval → const Duration
Longest a verdict on "is the app shown paused" is reused before the runner and the device are asked again.
pauseKinds → const Set<String>
The VM pause kinds that mean the isolate runs no code until resumed.
structuredErrorKind → const String
Extension event kind Flutter posts for each framework error when structured errors are on.
surfaceReadTimeout → const Duration
How long a native surface read may take before it counts as unreadable.