LiveApp class
A running Nylo app that metro live:* can send commands to.
Constructors
Properties
- client → JsonRpcClient
-
The JSON-RPC connection to the app's VM service.
final
- device → String
-
The device name reported by the Dart Tooling Daemon, e.g.
iPhone 17e.final - hashCode → int
-
The hash code for this object.
no setterinherited
- ideName → String?
-
The IDE hosting the daemon that listed this app, if any.
final
- isolateId ↔ String
-
The isolate that registered the
ext.nylo.*extensions.getter/setter pair - package → String
-
The app's pubspec package name.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
status
↔ Map<
String, Object?> -
The latest
ext.nylo.statuspayload.getter/setter pair - uri → Uri
-
The VM service WebSocket URI.
final
- workspaceRoot → String?
-
The workspace root of the daemon that listed this app, if any.
final
Methods
-
call(
String command, [Map< String, Object?> ? args, Duration? timeout]) → Future<Object?> -
Sends the live
command(e.g.route.push) withargsto the app. -
close(
) → Future< void> - Closes the connection to the app.
-
events(
) → Stream< LiveEvent> -
Streams the events this app posts to the
nyloVM service stream. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
reload(
{Duration timeout = const Duration(seconds: 60)}) → Future< Duration> - Hot reloads the app through the Flutter tool that launched it.
-
restart(
{Duration timeout = const Duration(seconds: 60)}) → Future< Duration> - Hot restarts the app through the Flutter tool that launched it, then finds the new Nylo isolate.
-
toolServiceMethod(
String service, {Duration timeout = const Duration(seconds: 2)}) → Future< String?> -
Finds the method the attached Flutter tool registered for
service(reloadSourcesorhotRestart), e.g.s1.reloadSources. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
connect(
Uri uri, {required String device, required String package, Duration timeout = const Duration(seconds: 3), String? workspaceRoot, String? ideName, String? projectRoot, bool trusted = false}) → Future< LiveApp> -
Connects to the VM service at
uriand finds the Nylo isolate. -
findNyloIsolate(
JsonRpcClient client, {Duration? timeout}) → Future< String?> -
Returns the id of the isolate exposing
ext.nylo.status, or null. -
isInside(
String path, String root) → bool -
Whether
pathisrootor inside it, after resolving symlinks such as macOS/tmp→/private/tmp. -
parseStreamEvent(
JsonRpcNotification notification, String streamId) → LiveEvent? -
Parses a VM service
streamNotifynotificationforstreamId. -
resolveEntrypoint(
JsonRpcClient client, String isolateId, String? rootLib, {Duration? timeout}) → Future< String?> -
Resolves the app's root library (e.g.
package:shop/main.dart) to the file it was compiled from, or null when the VM service can't say.
Constants
- statusExtension → const String
- The extension every Nylo app registers; used to find the right isolate.