setEnabled method

Future<void> setEnabled(
  1. String id,
  2. bool enabled
)

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.

Implementation

Future<void> setEnabled(
  String id,
  bool enabled,
) async {
  await promiseToFuture<void>($js.chrome.management.setEnabled(
    id,
    enabled,
  ));
}