launch method

Future<Process> launch()

Launches the GUI

Implementation

Future<Process> launch() async {
  final platform = SupportedPlatform.current;
  final guiExecPath = platform.getGuiExecutablePath();

  if (!await File(guiExecPath).exists()) {
    throw LaunchAppFailedException(suggestions: [
      'Make sure you have installed the GUI',
      'Run `${app.executableName} install` to install the GUI.',
    ]);
  }

  return await Process.start(
    guiExecPath,
    [projectDir],
    environment: {EnvVarKeys.pwd: projectDir},
    runInShell: true,
  );
}