What is the dart equivalent of getScript


What is the Dart equivalent of Jquery getScript (to load javascript from Dart) ?

Thanks for your suggestions.


I don’t think Dart provides a function that does this.

You can fetch the script using an HttpRequest, create a script element, add the received text to the element and then use Dart-js-Interop to call a JavaScript function.

Alternatively you can add jQuery and call getScript using Dart-js-Interop.

Answered By – Günter Zöchbauer

Answer Checked By – Pedro (FlutterFixes Volunteer)

Leave a Reply

Your email address will not be published. Required fields are marked *