UrlLauncherPlugin class
The web implementation of UrlLauncherPlatform.
This class implements the package:url_launcher functionality for the web.
- Inheritance
-
- Object
- PlatformInterface
- UrlLauncherPlugin
Constructors
- UrlLauncherPlugin({@visibleForTesting Window? debugWindow})
- A constructor that allows tests to override the window object used by the plugin.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- linkDelegate → LinkDelegate
-
The delegate used by the Link widget to build itself.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
canLaunch(
String url) → Future< bool> -
Returns
trueif this platform is able to launchurl. -
closeWebView(
) → Future< void> -
Closes the web view, if one was opened earlier by
launchUrl.inherited -
launch(
String url, {bool useSafariVC = false, bool useWebView = false, bool enableJavaScript = false, bool enableDomStorage = false, bool universalLinksOnly = false, Map< String, String> headers = const <String, String>{}, String? webOnlyWindowName}) → Future<bool> -
Passes
urlto the underlying platform for handling. -
launchUrl(
String url, LaunchOptions options) → Future< bool> -
Passes
urlto the underlying platform for handling. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
openNewWindow(
String url, {String? webOnlyWindowName}) → bool -
Opens the given
urlin the specifiedwebOnlyWindowName. -
supportsCloseForMode(
PreferredLaunchMode mode) → Future< bool> - Returns true if the given launch mode can be closed with closeWebView.
-
supportsMode(
PreferredLaunchMode mode) → Future< bool> - Returns true if the given launch mode is supported by the current implementation.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
registerWith(
Registrar registrar) → void -
Registers this class as the default instance of
UrlLauncherPlatform.