Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Windows support to url_launcher plugin #61051

Closed
kjk opened this issue Jul 8, 2020 · 2 comments
Closed

Add Windows support to url_launcher plugin #61051

kjk opened this issue Jul 8, 2020 · 2 comments

Comments

@kjk
Copy link

kjk commented Jul 8, 2020

The code is as simple as:

Future<ProcessResult> launchURL(String url) {
  url = url.replaceAll("&", "^&");
  return Process.run("start", [url], runInShell: true);
}

url = url.replaceAll("&", "^&"); is needed because runInShell runs the command as equivalent of cmd.exe /c "start ${url}" and & is interpreted by cmd.exe and needs to be escaped with ^.

@stuartmorgan
Copy link
Contributor

Duplicate of #41721

@stuartmorgan stuartmorgan marked this as a duplicate of #41721 Jul 8, 2020
@github-actions
Copy link

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants