PWAApi class
This domain allows interacting with the browser to control PWAs.
Constructors
- PWAApi(Client _client)
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
getOsAppState(
String manifestId) → Future< GetOsAppStateResult> -
Returns the following OS state for the given manifest id.
manifestId
The id from the webapp's manifest file, commonly it's the url of the site installing the webapp. See https://web.dev/learn/pwa/web-app-manifest. -
install(
String manifestId, {String? installUrlOrBundleUrl}) → Future< void> - Installs the given manifest identity, optionally using the given install_url or IWA bundle location.
-
launch(
String manifestId, {String? url}) → Future< TargetID> - Launches the installed web app, or an url in the same web app instead of the default start url if it is provided. Returns a page Target.TargetID which can be used to attach to via Target.attachToTarget or similar APIs. Returns: ID of the tab target created as a result.
-
launchFilesInApp(
String manifestId, List< String> files) → Future<List< TargetID> > - Opens one or more local files from an installed web app identified by its manifestId. The web app needs to have file handlers registered to process the files. The API returns one or more page Target.TargetIDs which can be used to attach to via Target.attachToTarget or similar APIs. If some files in the parameters cannot be handled by the web app, they will be ignored. If none of the files can be handled, this API returns an error. If no files provided as the parameter, this API also returns an error.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
openCurrentPageInApp(
String manifestId) → Future< void> - Opens the current page in its web app identified by the manifest id, needs to be called on a page target. This function returns immediately without waiting for the app finishing loading.
-
toString(
) → String -
A string representation of this object.
inherited
-
uninstall(
String manifestId) → Future< void> - Uninstals the given manifest_id and closes any opened app windows.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited