-
Notifications
You must be signed in to change notification settings - Fork 29.8k
Closed
Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projectc: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityp: url_launcherPlugin to launch external applicationsPlugin to launch external applicationspackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.platform-webWeb applications specificallyWeb applications specifically
Description
Use case
Browser APIs allow users to open urls in multiple ways:
- same window
- new window
- new window with an specific name
- an already existing window
Currently we don't provide mechanisms to specify those behaviors, instead we force users to open all urls always in a new tab.
Proposal
To give users control about how they believe an specific url should be opened, my proposal is to add a new windowName web-only param to the launch method.
Future<bool> launch(
String urlString, {
bool forceSafariVC,
bool forceWebView,
bool enableJavaScript,
bool enableDomStorage,
bool universalLinksOnly,
String windowName,
Map<String, String> headers,
Brightness statusBarBrightness,
})That will be used by the web implementation like this
html.WindowBase openNewWindow(String url, String windowName = '') {
return _window.open(url, windowName);
}nilsreichardt and vazkir
Metadata
Metadata
Assignees
Labels
P3Issues that are less important to the Flutter projectIssues that are less important to the Flutter projectc: new featureNothing broken; request for a new capabilityNothing broken; request for a new capabilityp: url_launcherPlugin to launch external applicationsPlugin to launch external applicationspackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.platform-webWeb applications specificallyWeb applications specifically