ExtensionInfo constructor

ExtensionInfo({
  1. required String id,
  2. required String name,
  3. required String shortName,
  4. required String description,
  5. required String version,
  6. String? versionName,
  7. required bool mayDisable,
  8. bool? mayEnable,
  9. required bool enabled,
  10. ExtensionDisabledReason? disabledReason,
  11. required bool isApp,
  12. required ExtensionType type,
  13. String? appLaunchUrl,
  14. String? homepageUrl,
  15. String? updateUrl,
  16. required bool offlineEnabled,
  17. required String optionsUrl,
  18. List<IconInfo>? icons,
  19. required List<String> permissions,
  20. required List<String> hostPermissions,
  21. required ExtensionInstallType installType,
  22. LaunchType? launchType,
  23. 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),
      );