googlearchive / chromedeveditor

Chrome Dev Editor is a developer tool for building apps on the Chrome platform - Chrome Apps and Web Apps, in JavaScript or Dart. (NO LONGER IN ACTIVE DEVELOPMENT)
BSD 3-Clause "New" or "Revised" License
2.92k stars 410 forks source link

Error compiling file #4081

Open pablomujica opened 7 years ago

pablomujica commented 7 years ago

The following error shows up when i'm trying to run the hello world default code when you create a project in with project type: Dart Chrome App

[error] Can't read 'package:chrome/chrome_app.dart' (ChromeService error: Could not resolve reference: package:chrome/chrome_app.dart

the code is as follow:


import 'dart:html';

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

int boundsChange = 100;
int count = 0;

void main() {
  querySelector('#text_id').onClick.listen(resizeWindow);
}

void resizeWindow(MouseEvent event) {
  chrome.ContentBounds bounds = chrome.app.window.current().getBounds();

  bounds.width += boundsChange;
  bounds.left -= boundsChange ~/ 2;

  chrome.app.window.current().setBounds(bounds);

  boundsChange *= -1;

  querySelector("#count").text = (count++).toString();
}