最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

convert javascript to dart - Stack Overflow

programmeradmin2浏览0评论

I am reading To leverage one of the many existing libraries written in JavaScript, use package:js. If a TypeScript type definition file exists for a JavaScript library (see DefinitelyTyped for more info), you can use the js_facade_gen tool to generate Dart code for that library. from .

I am curious how convert javascript library to dart file in the example .dart. I guess there are two steps: 1, generate TypeScript type definition file (ts file) from the javascript library; 2, Use js_facade_gen to convert ts file to dart.

I hope get more details. but the document is lacking. Any hints weled. Thanks

I am reading To leverage one of the many existing libraries written in JavaScript, use package:js. If a TypeScript type definition file exists for a JavaScript library (see DefinitelyTyped for more info), you can use the js_facade_gen tool to generate Dart code for that library. from https://webdev.dartlang/guides/web-programming.

I am curious how convert javascript library to dart file in the example https://github./google/chartjs.dart. I guess there are two steps: 1, generate TypeScript type definition file (ts file) from the javascript library; 2, Use js_facade_gen to convert ts file to dart.

I hope get more details. but the document is lacking. Any hints weled. Thanks

Share Improve this question asked Jul 1, 2018 at 3:31 BAEBAE 9,00623 gold badges98 silver badges182 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 9

There is no way to convert JavaScript to Dart automatically.
package:js allows you to call JavaScript from Dart in Dart browser apps.

发布评论

评论列表(0)

  1. 暂无评论