LiveDiscovery class

Finds the running apps of one project through the Dart Tooling Daemons that flutter run sessions and IDEs register them with.

Constructors

LiveDiscovery({required String projectRoot, required String packageName, Duration timeout = const Duration(seconds: 3), LiveDaemonLister? listDaemons})
Creates a LiveDiscovery for the project at projectRoot whose pubspec name is packageName.

Properties

hashCode → int
The hash code for this object.
no setterinherited
packageName → String
The project's pubspec name; apps of other packages are never contacted.
final
projectRoot → String
The project root, used to prefer the project's own daemons.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
timeout → Duration
How long to wait for each daemon and app.
final

Methods

discover() → Future<LiveDiscoveryResult>
Discovers this project's running apps.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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

Static Methods

canonicalPath(String path) → String
Resolves symlinks (e.g. macOS /tmp → /private/tmp) and trailing separators so workspace roots compare reliably.
normalizeVmServiceUri(String address) → Uri?
Turns a VM service address in any of its printed forms into the WebSocket URI clients connect to.