дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-12-05 17:47:08 +02:00
Flutter apps started with Run now run through flutter run --machine. Hot Reload and Hot Restart send app.restart requests with the app's id instead of typing r / R into the process. The buttons are enabled once the app reports app.started and supportsRestart. The JSON protocol on stdout is decoded into plain console lines (app.log, progress, daemon messages, failed restarts). Lines outside the protocol show unchanged, and these runs never go through a terminal emulator. Run-mode apps are kept in a workbench store, so the Flutter Inspector, DevTools and Extensions windows connect to them through the wsUri of app.debugPort, the same way they connect to Debug sessions. The Inspector lists Debug and Run apps together. Part of #4096. Co-authored-by: wildcatDownstairs <[email protected]>
23 рядки
689 B
TypeScript
23 рядки
689 B
TypeScript
/**
|
|
* Flutter apps started by Run (`flutter run --machine`), by Run tab. The Run feature keeps them;
|
|
* the DevTools windows connect to them as they do to the apps of Debug sessions.
|
|
*/
|
|
import { create } from "zustand";
|
|
|
|
export interface FlutterRunApp {
|
|
/** The Run tab's session id. */
|
|
session: string;
|
|
name: string;
|
|
appId: string | null;
|
|
device: string | null;
|
|
/** `app.started` came: the app takes hot reloads, when it `supportsRestart`. */
|
|
started: boolean;
|
|
supportsRestart: boolean;
|
|
vmServiceUri?: string;
|
|
/** Its process still runs. */
|
|
live: boolean;
|
|
startedAt: number;
|
|
}
|
|
|
|
export const useFlutterRunApps = create<Record<string, FlutterRunApp>>(() => ({}));
|