Provide Dart interop with chrome.* APIs for Chrome Packaged Apps
Clone or download
wigahluk and bholtz Regenerating classes exposed in "app.dart". (#269)
* Regenerating classes exposed in "app.dart".

Several classes where missing from "app.dart" including ChromeAppRuntime which caused some dependencies to break. This commit regenerates those classes.

* Updates version on `pubspec.yaml` and adds new entry on ``.
Latest commit 6960c90 May 3, 2018


Build Status

An library for accessing the Chrome APIs in a packaged app or extension.


Add this to your package's pubspec.yaml file:

  chrome: any

Using the library

import 'package:chrome/chrome_app.dart' as chrome;

void main() {
  chrome.runtime.getPlatformInfo().then((Map m) {

Also, see the FAQ.

In your pubspec.yaml

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:

- chrome

to your pubspec.yaml file.


Documentation is available at:

Breaking Changes

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';