core/commands/launch/launch library
Classes
- LaunchError
- Generic / unrecognised error.
- LaunchInvalidLauncherPid
- The controller process PID could not be determined.
- LaunchLauncherFailed
- The controller process failed to start.
- LaunchMissingDevice
- No --device was provided.
- LaunchProcessDied
- The flutter process exited before the VM service URI appeared in the log.
- LaunchResult
- Result of a launchApp invocation.
- LaunchSuccess
- App launched successfully. VM service is reachable at vmServiceUri.
- LaunchTimeout
- The VM service URI did not appear within launchTimeoutSeconds. tailLogLines contains the last 10 lines of the log (may be empty).
Functions
-
cleanupLaunchSessionFiles(
) → void - Removes launch-owned session files before starting a new launch.
-
launchApp(
LaunchInput input, {void onProgress(String) = _noop}) → Future< LaunchResult> - Launches a Flutter app as a detached background process and waits for the VM service URI to appear in the log.
-
readLaunchPid(
) → String - Reads the app or flutter-tools PID written during launch.
-
writeAppIdFromProjectForLaunch(
String projectPath) → void - Reads the app bundle id (iOS/macOS) or application id (Android) from the project's native config files and persists it to appIdFile.
-
writePlatformInfoForLaunch(
String device, String flutter, {ProcessRunner processRunner = Process.run}) → Future< String?> -
Queries flutter devices --machine to find the targetPlatform, emulator flag,
and friendly name for
device.
Typedefs
- LaunchInput = ({String? device, String? flavor, String? flutterSdk, bool interactive, String? project, String? target, bool verbose})
- Input parameters for launchApp.
-
ProcessRunner
= Future<
ProcessResult> Function(String executable, List<String> arguments)