Having a weird issue. In my Dart code I have some polymer components on the screen and one of them has a method I call from my main().
I grab a reference to it by do
When you run this code from the main()
method it is probably a timing issue.
You can try something like
import "package:polymer/polymer.dart";
main() {
initPolymer().run(() {
// code here works most of the time
Polymer.onReady.then((e) {
// some things must wait until onReady callback is called
});
});
}
see also how to implement a main function in polymer apps