An library for accessing the Chrome APIs in a packaged app or extension.
Add this to your package's pubspec.yaml file:
dependencies:
chrome: any
import 'package:chrome/chrome_app.dart' as chrome;
void main() {
chrome.runtime.getPlatformInfo().then((Map m) {
print(m.toString());
});
}
Also, see the FAQ.
In order to build your app with pub build
, you'll need to tell it to select
the CSP compliant output of dart2js. To do that, add these lines:
transformers:
- chrome
to your pubspec.yaml
file.
Documentation is available at:
For version 0.5.0, we removed the older chrome.socket
API in favor of the new
chrome.sockets
API. In order to continue using the older API, you can
reference it directly via an import:
import 'package:chrome/gen/socket.dart';
files_exp.dart
and files.dart
bin
to tool
in order to avoid exposing in in the bin
directorychrome.bluetoothLowEnergy
APIchrome.bluetoothSocket
APIchrome.commands
APIchrome.hid
APItoString()
to the FileError
implementationChromeAppWindow
classchrome.sockets
APIchrome.socket
API has been removed from the chrome_app.dart
library. In order to continue using it, you can reference it directly
(import 'package:chrome/gen/socket.dart';
)chrome.gcm
; exposes Google Cloud Messagingchrome.signedInDevices
chrome.wallpaper
chrome.system.display
chrome.system.network
entry.metaData.timeStamp
>=0.3.0 <0.4.0
_interface
in the chrome idl.import 'package:chrome/app.dart';
import 'package:chrome/ext.dart';
chrome.app.window
API including several breaking changes, please
refer to the dartdoc for usage.Add this to your package's pubspec.yaml file:
dependencies:
chrome: ^0.9.33
You can install packages from the command line:
with pub:
$ pub get
Alternatively, your editor might support pub get
.
Check the docs for your editor to learn more.
Now in your Dart code, you can use:
import 'package:chrome/chrome_app.dart';
import 'package:chrome/chrome_ext.dart';
import 'package:chrome/transformer.dart';
Version | Uploaded | Documentation | Archive |
---|---|---|---|
0.10.1 | May 4, 2018 |
|
|
0.10.0 | Apr 30, 2018 |
|
|
0.9.34 | Mar 9, 2018 |
|
|
0.9.33 | Aug 23, 2017 |
|
|
0.9.32 | Aug 21, 2017 |
|
|
0.9.31 | Mar 30, 2017 |
|
|
0.9.3 | Mar 28, 2017 |
|
|
0.9.2 | Sep 26, 2016 |
|
|
0.9.1 | Jul 2, 2016 |
|
|
0.9.0 | Jul 2, 2016 |
|
|
Popularity:
Describes how popular the package is relative to other packages.
[more]
|
49
|
Health:
Code health derived from static analysis.
[more]
|
--
|
Maintenance:
Reflects how tidy and up-to-date the package is.
[more]
|
--
|
Overall:
Weighted score of the above.
[more]
|
24
|
The package version is not analyzed, because it does not support Dart 2. Until this is resolved, the package will receive a health and maintenance score of 0.
Support Dart 2 in pubspec.yaml
.
The SDK constraint in pubspec.yaml
doesn't allow the Dart 2.0.0 release. For information about upgrading it to be Dart 2 compatible, please see https://www.dartlang.org/dart-2#migration.
Make sure dartdoc
successfully runs on your package's source files. (-10 points)
Dependencies were not resolved.
Package | Constraint | Resolved | Available |
---|---|---|---|
Direct dependencies | |||
Dart SDK | >=1.8.0 <2.0.0 |