install method

Future<void> install(
  1. String manifestId, {
  2. String? installUrlOrBundleUrl,
})

Installs the given manifest identity, optionally using the given install_url or IWA bundle location.

TODO(crbug.com/337872319) Support IWA to meet the following specific requirement. IWA-specific install description: If the manifest_id is isolated-app://, install_url_or_bundle_url is required, and can be either an http(s) URL or file:// URL pointing to a signed web bundle (.swbn). The .swbn file's signing key must correspond to manifest_id. If Chrome is not in IWA dev mode, the installation will fail, regardless of the state of the allowlist. installUrlOrBundleUrl The location of the app or bundle overriding the one derived from the manifestId.

Implementation

Future<void> install(String manifestId,
    {String? installUrlOrBundleUrl}) async {
  await _client.send('PWA.install', {
    'manifestId': manifestId,
    if (installUrlOrBundleUrl != null)
      'installUrlOrBundleUrl': installUrlOrBundleUrl,
  });
}