loadUnpacked method
Installs an unpacked extension from the filesystem similar to
--load-extension CLI flags. Returns extension ID once the extension
has been installed. Available if the client is connected using the
--remote-debugging-pipe flag and the --enable-unsafe-extension-debugging
flag is set.
path Absolute file path.
enableInIncognito Enable the extension in incognito
Returns: Extension id.
Implementation
Future<String> loadUnpacked(String path, {bool? enableInIncognito}) async {
var result = await _client.send('Extensions.loadUnpacked', {
'path': path,
if (enableInIncognito != null) 'enableInIncognito': enableInIncognito,
});
return result['id'] as String;
}