Dart with jQuery
There is no doubt that jQuery has become very popular among developers because of its simplicity. Let's try to combine the simplicity of jQuery and the power of Dart in a real example. For demonstration purposes, we created the js_proxy
package to help the Dart code to communicate with jQuery. It is available on the pub manager at https://pub.dartlang.org/packages/js_proxy. This package is layered on dart:js
and has a library of the same name and sole class JProxy
. An instance of the JProxy
class can be created via the generative constructor where we can specify the optional reference on the proxied JsObject
:
JProxy([this._object]);
We can create an instance of JProxy
with a named constructor and provide the name of the JavaScript ...
Get Dart: Scalable Application Development now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.