UiSnapshot class

The SDK's single source of truth for the UI at one instant in time.

Constructors

UiSnapshot({required String screen, required List<UiNode> nodes, required Map<String, String> paths, required List<int> visibleIndex, required DateTime capturedAt, required Size viewportSize, List<UiOverlay> overlays = const []})
const

Properties

capturedAt → DateTime
final
hashCode → int
The hash code for this object.
no setterinherited
nodes → List<UiNode>
final
overlays → List<UiOverlay>
final
paths → Map<String, String>
stableId → dotted path (0.2.1.4).
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
screen → String
final
viewportSize → Size
final
visibleIndex → List<int>
Indices into nodes of nodes whose visible == true.
final

Methods

findByStableId(String id) → UiNode?
O(n) lookup by stable ID.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited
toWire() → Map<String, dynamic>
Wire payload for the backend.

Operators

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

Static Methods

capture({required String screen, required Rect viewport}) → UiSnapshot?
Run the full pipeline: raw capture → normalize → stable IDs → snapshot.