google_apps 0.0.1+3

  • Example
  • Installing
  • Versions
  • 10

Dart APIs for Google Apps scripts #

This is not an official Google product. It is not supported by the Dart team.

This package is still in an experimental state.

A library to write Google Apps scripts.

This library has been written on a per-need basis. As such it is missing lots of useful functionality that I just hadn't needed yet. Until the API coverage is nearing completeness I recommend to checkout the GIT repository during development and to use this library with a path directive, adding the missing functions when they are encountered.

Consider contributing your changes back to the original repository.

Features and bugs #

Please file feature requests and bugs at the issue tracker.

Changelog #

0.0.1+3 #

  • Fix the sheet example.

0.0.1+2 #

  • Update README (removing the example and adding the issue tracker).

0.0.1+1 #

  • Rename the example file so it's recognized by

0.0.1 #

  • Initial version.


// Copyright 2018 Google LLC
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// See the License for the specific language governing permissions and
// limitations under the License.

/// Compile this example with
/// `dart2js --csp -o hello.js example/hello_docs.dart`.
/// See [apps_script_tools](
/// for a description on how to execute the generated program.

library hello_docs;

import 'package:js/js.dart';
import 'package:google_apps/document.dart';

external set sayHello(value);

external set onOpen(value);

void sayHelloDart() {
  DocumentApp.getUi().alert("Hello world");

void onOpenDart(e) {
      .createMenu("from dart")
      .addItem("say hello", "sayHello")

main(List<String> arguments) {
  onOpen = allowInterop(onOpenDart);
  sayHello = allowInterop(sayHelloDart);

Use this package as a library

1. Depend on it

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

  google_apps: ^0.0.1+3

2. Install it

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.

3. Import it

Now in your Dart code, you can use:

import 'package:google_apps/google_apps.dart';
Version Uploaded Documentation Archive
0.0.1+3 Feb 27, 2018 Go to the documentation of google_apps 0.0.1+3 Download google_apps 0.0.1+3 archive
0.0.1+2 Feb 27, 2018 Go to the documentation of google_apps 0.0.1+2 Download google_apps 0.0.1+2 archive
0.0.1+1 Feb 27, 2018 Go to the documentation of google_apps 0.0.1+1 Download google_apps 0.0.1+1 archive
0.0.1 Feb 26, 2018 Go to the documentation of google_apps 0.0.1 Download google_apps 0.0.1 archive
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

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.

Analysis issues and suggestions

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

Maintenance issues and suggestions

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.20.1 <2.0.0