runJS method

Future<void> runJS(
  1. String js
)

Implementation

Future<void> runJS(String js) async {
  if (_controller == null) return;
  try {
    await _controller?.evaluateJavascript(source: js);
  } catch (e) {
    debugPrint("❌ JS execution error: $e");
  }
}