ScreenNavigator class

Walks every reachable screen in the Flutter app using a two-phase strategy:

Phase 1 — Route injection Uses VmEvaluator to call the app's router API directly (GetX / GoRouter / Navigator 1.0 / AutoRoute / Beamer). Iterates over every route path found by static analysis.

Phase 2 — Universal tappable exploration Dumps the Android accessibility tree via uiautomator dump to get the exact pixel bounds of every clickable element on screen. Taps each one; if the root widget type or loaded source files change, a new screen was discovered. Presses BACK to return and repeats for the next element. No screen-size guessing, no nav-bar detection — works on any Flutter app.

Constructors

ScreenNavigator({required VmService vmService, required String isolateId, String? deviceId, int maxScreens = 10, AppAnalysis? analysis, String? projectPath})

Properties

analysis AppAnalysis?
Optional static analysis result — provides detected routes and router type.
final
deviceId String?
ADB device ID (e.g. Z5BISOCMHEP7FAXG). Required for Phase 2 taps. Pass an empty string or null to skip Phase 2.
final
discoveredScreens List<DiscoveredScreen>
All screens discovered so far, in discovery order.
final
hashCode int
The hash code for this object.
no setterinherited
isolateId String
Dart isolate ID of the running Flutter app.
final
maxScreens int
Maximum number of screens to discover before stopping. Defaults to 20.
final
projectPath String?
Absolute path to the Flutter project root — used to persist explored paths in .dangi_doctor/explored_paths.json across runs.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
vmService → VmService
Connected VM service used to read the widget tree and evaluate expressions.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
printSummary() → void
toString() String
A string representation of this object.
inherited
walkAllScreens() Future<List<DiscoveredScreen>>

Operators

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