ora c'è un nuovo modo più semplice https://pub.dartlang.org/packages/js (attualmente alla versione 0.6.0-beta.6)
Fai classi e funzioni JS disposizione Dart come:
@JS("JSON.stringify")
external String stringify(obj);
@JS('google.maps')
library maps;
// Invokes the JavaScript getter `google.maps.map`.
external Map get map;
// `new Map` invokes JavaScript `new google.maps.Map(location)`
@JS()
class Map {
external Map(Location location);
external Location getLocation();
}
// `new Location(...)` invokes JavaScript `new google.maps.LatLng(...)`
//
// We recommend against using custom JavaScript names whenever
// possible. It is easier for users if the JavaScript names and Dart names
// are consistent.
@JS("LatLng")
class Location {
external Location(num lat, num lng);
}
per più vedi il readme del pacchetto
fonte
2015-10-30 15:43:09
anche se sto postando la [domanda] (https://groups.google.com/a/dartlang.org/group/misc/browse_thread/thr ead/511a97cd362b4f08 #) ora. – TMB