Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dart2Js but readable

Does someone knows if there is a way to compile a library which is written in Dart to JS. But in a way so that the generated code looks like handwritten or pretty close to it?

I would like to write a flutter app and share the business logic with the web-team. I don't want to force anyone to use Dart.

Right now it seems to me that the way javascript to dart works fine, but the way back dart to javascript doesn't works. I feel's like a one-way road. It would be awesome if some proof me wrong and can show that dart can interop with JS and backward, like Kotlin with Java

Thx for your answer ;D

like image 253
swissonid Avatar asked Mar 31 '26 21:03

swissonid


1 Answers

DDC - Dart Dev Compiler does that to some degree.

It's not intended for production use, but there are projects out there that use it that way anyway.

like image 132
Günter Zöchbauer Avatar answered Apr 02 '26 10:04

Günter Zöchbauer



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!