Skip to content

Provide Dart interop with chrome.* APIs for Chrome Packaged Apps

License

Notifications You must be signed in to change notification settings

davewalker-wk/chrome.dart

This branch is up to date with dart-gde/chrome.dart:master.

Folders and files

NameName
Last commit message
Last commit date
Jul 2, 2016
Apr 30, 2018
May 3, 2018
Apr 30, 2018
Aug 21, 2017
Dec 12, 2017
Aug 7, 2015
Apr 26, 2015
Dec 17, 2012
May 3, 2018
Nov 17, 2015
May 3, 2018
Apr 26, 2015

Repository files navigation

chrome.dart

Build Status

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

Installing

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

dependencies:
  chrome: any

Using the library

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

void main() {
  chrome.runtime.getPlatformInfo().then((Map m) {
    print(m.toString());
  });
}

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:

transformers:
- chrome

to your pubspec.yaml file.

Documentation

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

About

Provide Dart interop with chrome.* APIs for Chrome Packaged Apps

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Dart 99.6%
  • Other 0.4%