ChromeManagement class

Properties

hashCode int
The hash code for this object.
no setterinherited
isAvailable bool
no setter
onDisabled EventStream<ExtensionInfo>
Fired when an app or extension has been disabled.
no setter
onEnabled EventStream<ExtensionInfo>
Fired when an app or extension has been enabled.
no setter
onInstalled EventStream<ExtensionInfo>
Fired when an app or extension has been installed.
no setter
onUninstalled EventStream<String>
Fired when an app or extension has been uninstalled.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

createAppShortcut(String id) Future<void>
Display options to create shortcuts for an app. On Mac, only packaged app shortcuts can be created. id This should be the id from an app item of management.ExtensionInfo.
Generate an app for a URL. Returns the generated bookmark app. url The URL of a web page. The scheme of the URL can only be "http" or "https". title The title of the generated app.
get(String id) Future<ExtensionInfo>
Returns information about the installed extension, app, or theme that has the given ID. id The ID from an item of management.ExtensionInfo.
getAll() Future<List<ExtensionInfo>>
Returns a list of information about installed extensions and apps.
getPermissionWarningsById(String id) Future<List<String>>
Returns a list of permission warnings for the given extension id. id The ID of an already installed extension.
getPermissionWarningsByManifest(String manifestStr) Future<List<String>>
Returns a list of permission warnings for the given extension manifest string. Note: This function can be used without requesting the 'management' permission in the manifest. manifestStr Extension manifest JSON string.
getSelf() Future<ExtensionInfo>
Returns information about the calling extension, app, or theme. Note: This function can be used without requesting the 'management' permission in the manifest.
installReplacementWebApp() Future<void>
Launches the replacement_web_app specified in the manifest. Prompts the user to install if not already installed.
launchApp(String id) Future<void>
Launches an application. id The extension id of the application.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setEnabled(String id, bool enabled) Future<void>
Enables or disables an app or extension. In most cases this function must be called in the context of a user gesture (e.g. an onclick handler for a button), and may present the user with a native confirmation UI as a way of preventing abuse. id This should be the id from an item of management.ExtensionInfo. enabled Whether this item should be enabled or disabled.
setLaunchType(String id, LaunchType launchType) Future<void>
Set the launch type of an app. id This should be the id from an app item of management.ExtensionInfo. launchType The target launch type. Always check and make sure this launch type is in ExtensionInfo.availableLaunchTypes, because the available launch types vary on different platforms and configurations.
toString() String
A string representation of this object.
inherited
uninstall(String id, UninstallOptions? options) Future<void>
Uninstalls a currently installed app or extension. Note: This function does not work in managed environments when the user is not allowed to uninstall the specified extension/app. If the uninstall fails (e.g. the user cancels the dialog) the promise will be rejected or the callback will be called with runtime.lastError set. id This should be the id from an item of management.ExtensionInfo.
uninstallSelf(UninstallOptions? options) Future<void>
Uninstalls the calling extension. Note: This function can be used without requesting the 'management' permission in the manifest. This function does not work in managed environments when the user is not allowed to uninstall the specified extension/app.

Operators

operator ==(Object other) bool
The equality operator.
inherited