Add a detach command to detach without terminating (#21376)
* Add a detach command to detach without terminating Fixes #21154. * Bump protocol version for app.detach * Tweak to detach/quit text * Change logPrefix to named param
This commit is contained in:
@@ -92,6 +92,12 @@ The `callServiceExtension()` allows clients to make arbitrary calls to service p
|
||||
- `methodName`: the name of the service protocol extension to invoke; this is required.
|
||||
- `params`: an optional Map of parameters to pass to the service protocol extension.
|
||||
|
||||
#### app.detach
|
||||
|
||||
The `detach()` command takes one parameter, `appId`. It returns a `bool` to indicate success or failure in detaching from an app without stopping it.
|
||||
|
||||
- `appId`: the id of a previously started app; this is required.
|
||||
|
||||
#### app.stop
|
||||
|
||||
The `stop()` command takes one parameter, `appId`. It returns a `bool` to indicate success or failure in stopping an app.
|
||||
@@ -110,7 +116,7 @@ This is sent when an observatory port is available for a started app. The `param
|
||||
|
||||
#### app.started
|
||||
|
||||
This is sent once the application launch process is complete and the app is either paused before main() (if `startPaused` is true) or main() has begun running. The `params` field will be a map containing the field `appId`.
|
||||
This is sent once the application launch process is complete and the app is either paused before main() (if `startPaused` is true) or main() has begun running. When attaching, this even will be fired once attached. The `params` field will be a map containing the field `appId`.
|
||||
|
||||
#### app.log
|
||||
|
||||
@@ -122,7 +128,7 @@ This is sent when an operation starts and again when it stops. When an operation
|
||||
|
||||
#### app.stop
|
||||
|
||||
This is sent when an app is stopped. The `params` field will be a map with the field `appId`.
|
||||
This is sent when an app is stopped or detached from. The `params` field will be a map with the field `appId`.
|
||||
|
||||
### device domain
|
||||
|
||||
@@ -204,6 +210,7 @@ The following subset of the app domain is available in `flutter run --machine`.
|
||||
- Commands
|
||||
- [`restart`](#apprestart)
|
||||
- [`callServiceExtension`](#appcallserviceextension)
|
||||
- [`detach`](#appdetach)
|
||||
- [`stop`](#appstop)
|
||||
- Events
|
||||
- [`start`](#appstart)
|
||||
@@ -219,6 +226,7 @@ See the [source](https://github.com/flutter/flutter/blob/master/packages/flutter
|
||||
|
||||
## Changelog
|
||||
|
||||
- 0.4.2: Added `app.detach` command
|
||||
- 0.4.1: Added `flutter attach --machine`
|
||||
- 0.4.0: Added `emulator.create` command
|
||||
- 0.3.0: Added `daemon.connected` event at startup
|
||||
|
||||
Reference in New Issue
Block a user