Run Javascript In Flutter

[Solved] Run Javascript In Flutter | Javascript Frameworks Flutter - Code Explorer | yomemimo.com
Question : run javascript in flutter

Answered by : rawand-faraidun

@JS() // Sets the context, which in this case is `window`
library main; // required library declaration called main, or whatever name you wish
import 'package:js/js.dart'; // Pull in our dependency
@JS('parent.jsFunction') // This marks the annotated function as a call to the function
external void jsFunction(dynamic command, dynamic arg);
void callJsFunction() { jsFunction('command', 'args'); // calls the function in javascript
}

Source : https://stackoverflow.com/questions/58702938/calling-a-javascript-function-from-flutter-app | Last Update : Mon, 21 Jun 21

Answers related to run javascript in flutter

Code Explorer Popular Question For Javascript Frameworks Flutter