0

I want to access the function which I have defined in js file and I need to access that function from my dart file,

I have followed the following way for the access, but when I am trying to access that function from dart file for the web, it's working fine, But when I am going to access that for mobile app (Android and iOS), then getting an error,

Error:

Error: Not found: 'dart:js' import 'dart:js'

Ref: https://fireship.io/snippets/using-js-with-flutter-web/

If anyone help for this situation?

Harsh Panchal
  • 826
  • 6
  • 16

1 Answers1

-1

Inset import 'dart:js' on the very top of your code

Ronan Hansel
  • 99
  • 1
  • 3