ExtensionInfo constructor
ExtensionInfo({
- required String id,
- required String name,
- required String shortName,
- required String description,
- required String version,
- String? versionName,
- required bool mayDisable,
- bool? mayEnable,
- required bool enabled,
- ExtensionDisabledReason? disabledReason,
- required bool isApp,
- required ExtensionType type,
- String? appLaunchUrl,
- String? homepageUrl,
- String? updateUrl,
- required bool offlineEnabled,
- required String optionsUrl,
- List<
IconInfo> ? icons, - required List<
String> permissions, - required List<
String> hostPermissions, - required ExtensionInstallType installType,
- LaunchType? launchType,
- List<
LaunchType> ? availableLaunchTypes,
Implementation
ExtensionInfo({
/// The extension's unique identifier.
required String id,
/// The name of this extension, app, or theme.
required String name,
/// A short version of the name of this extension, app, or theme.
required String shortName,
/// The description of this extension, app, or theme.
required String description,
/// The [version](reference/manifest/version) of this extension, app, or
/// theme.
required String version,
/// The [version name](reference/manifest/version#version_name) of this
/// extension, app, or theme if the manifest specified one.
String? versionName,
/// Whether this extension can be disabled or uninstalled by the user.
required bool mayDisable,
/// Whether this extension can be enabled by the user. This is only returned
/// for extensions which are not enabled.
bool? mayEnable,
/// Whether it is currently enabled or disabled.
required bool enabled,
/// A reason the item is disabled.
ExtensionDisabledReason? disabledReason,
/// True if this is an app.
required bool isApp,
/// The type of this extension, app, or theme.
required ExtensionType type,
/// The launch url (only present for apps).
String? appLaunchUrl,
/// The URL of the homepage of this extension, app, or theme.
String? homepageUrl,
/// The update URL of this extension, app, or theme.
String? updateUrl,
/// Whether the extension, app, or theme declares that it supports offline.
required bool offlineEnabled,
/// The url for the item's options page, if it has one.
required String optionsUrl,
/// A list of icon information. Note that this just reflects what was
/// declared in the manifest, and the actual image at that url may be larger
/// or smaller than what was declared, so you might consider using explicit
/// width and height attributes on img tags referencing these images. See
/// the [manifest documentation on icons](reference/manifest/icons) for more
/// details.
List<IconInfo>? icons,
/// Returns a list of API based permissions.
required List<String> permissions,
/// Returns a list of host based permissions.
required List<String> hostPermissions,
/// How the extension was installed.
required ExtensionInstallType installType,
/// The app launch type (only present for apps).
LaunchType? launchType,
/// The currently available launch types (only present for apps).
List<LaunchType>? availableLaunchTypes,
}) : _wrapped = $js.ExtensionInfo(
id: id,
name: name,
shortName: shortName,
description: description,
version: version,
versionName: versionName,
mayDisable: mayDisable,
mayEnable: mayEnable,
enabled: enabled,
disabledReason: disabledReason?.toJS,
isApp: isApp,
type: type.toJS,
appLaunchUrl: appLaunchUrl,
homepageUrl: homepageUrl,
updateUrl: updateUrl,
offlineEnabled: offlineEnabled,
optionsUrl: optionsUrl,
icons: icons?.toJSArray((e) => e.toJS),
permissions: permissions.toJSArray((e) => e),
hostPermissions: hostPermissions.toJSArray((e) => e),
installType: installType.toJS,
launchType: launchType?.toJS,
availableLaunchTypes: availableLaunchTypes?.toJSArray((e) => e.toJS),
);