I\'m trying to create a simple dialog in Dart and I thought it was easier to use existing javascript libraries. Here you can find the basic example, basically
$(
Basically, there are 2 libraries to interop with js : dart:js and package:js. dart:js has been created after package:js and most of the stackoverflow answers use package:js and are still valid (it isn't worth to downvote these answers...)
package:js provides a simpler Api that comes at the cost of an increase of the js size (because package:js uses dart:mirrors and noSuchMethod).
With package:js :
import 'package:js/js.dart' as js;
main() {
js.context.$("#dialog").dialog();
}
With dart:js :
import 'dart:js' as js;
main() {
js.context.callMethod(r'$', ['#dialog']).callMethod('dialog');
}