openUrl function

Future<ProcessResult> openUrl (
  1. String url
)

Open the given URL in the user's default application for the URL's scheme.

http and https URLs, for example, will be opened in the default browser.

The default utility to open URLs for the platform is used. A process is spawned to run that utility, with the ProcessResult being returned.

Implementation

Future<ProcessResult> openUrl(String url) {
  return Process.run(_command, [url], runInShell: true);
}