start method

Future<ChromeProcess> start({
  1. String? url,
  2. int debugPort = 9222,
})

Implementation

Future<ChromeProcess> start({String? url, int debugPort = 9222}) {
  final args = <String>[
    '--no-default-browser-check',
    '--no-first-run',
    '--user-data-dir=${getCreateChromeDataDir()}',
    '--remote-debugging-port=$debugPort',
  ];
  if (useChromeHeadless && headlessModeIsSupported) {
    args.addAll(<String>[
      '--headless',
      '--disable-gpu',
    ]);
  }
  if (url != null) {
    args.add(url);
  }
  return Process.start(executable, args).then((Process process) {
    return ChromeProcess(process, debugPort);
  });
}