I understand Dart compiles to JavaScript, and I read the Dart Language Spec on Libraries, although I didn't see an answer there. Also a search on their discussion form for the word 'existing' turns up 3 results that are not related.
Does anyone know if Dart will support the use of existing JavaScript libraries such as jQuery or Raphael?
The Dart web platform supports calling JavaScript using the js package, also known as package:js. For help using the js package, see the following: Documentation for the js package: pub.
The Javascript runtimes runs synchronously through the dart ffi. So now you can run javascript code as a native citzen inside yours Flutter Mobile Apps (Android, IOS, Windows, Linux and MacOS are all supported).
Dart has a rich set of core libraries that provide essentials for many everyday programming tasks such as working on collections of objects ( dart:collection ), making calculations ( dart:math ), and encoding/decoding data ( dart:convert ). Additional APIs are available in commonly used packages.
The answer is now Yes! Dart now ships a JS-interop library to use existing JavaScript code with your Dart app. Learn more here: https://www.dartlang.org/articles/js-dart-interop/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With