Using Dart (webdev) to write a js library / expose a dart api to js. IN THE BROWSER

Issue

Please give a simple but complete example showing how to write a library in dart that can be used from javascript in the browser without using requirejs.

The library should contain a function, a class and a global variable.

A reference to sass-dart is not a solution to that problem because it is for use with nodejs and requirejs.

Solution

Simple answer: It’s not possible.

Answered By – tod3a

Answer Checked By – Katrina (FlutterFixes Volunteer)

Leave a Reply

Your email address will not be published.