Can I export a Dart plugin as a JavaScript package to be used in a separate Web app?

27 Views Asked by At

I have a Dart Plugin originally setup for Android & IOS which is used to store business logic.

I'd like to export/compile the Dart plugin to Javascript so that it could be consumed by a separate pre-existing React app. Is this possible?

Ideally I'd like to end up with a my-plugin.js that can be imported by the React app.

I have tried to set the plugin up for web following: https://docs.flutter.dev/packages-and-plugins/developing-packages#add-support-for-platforms-in-an-existing-plugin-project but haven't succeeded in being able to create a JavaScript version of the package.

0

There are 0 best solutions below