[flutter_tools] Include mode in app.start event, and forward app.start to DAP clients (#121239)

[flutter_tools] Include mode in app.start event, and forward app.start to DAP clients
This commit is contained in:
Danny Tuppeny
2023-04-05 06:39:09 +01:00
committed by GitHub
parent 9235eb64e2
commit 1a6a20cdc6
7 changed files with 59 additions and 6 deletions

View File

@@ -393,6 +393,16 @@ class FlutterDebugAdapter extends FlutterBaseDebugAdapter {
// session (which is much slower, but required for profile/release mode).
final bool supportsRestart = (params['supportsRestart'] as bool?) ?? false;
sendEvent(CapabilitiesEventBody(capabilities: Capabilities(supportsRestartRequest: supportsRestart)));
// Send a custom event so the editor has info about the app starting.
//
// This message contains things like the `deviceId` and `mode` that the
// client might not know about if they were inferred or set by users custom
// args.
sendEvent(
RawEventBody(params),
eventType: 'flutter.appStart',
);
}
/// Handles the app.started event from Flutter.