Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

snippets/using-js-with-flutter-web/ #755

Open
utterances-bot opened this issue Apr 29, 2022 · 4 comments
Open

snippets/using-js-with-flutter-web/ #755

utterances-bot opened this issue Apr 29, 2022 · 4 comments

Comments

@utterances-bot
Copy link

How to use JS with Flutter Web

How to interop between JavaScript and Dart with Flutter Web

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

Copy link

Hi , i cannot able to get Output from ur code it shows error

Error: NoSuchMethodError: 'alertMessage'
method not found
Receiver: Instance of 'Window'
Arguments: ["Flutter is calling upon JavaScript!"]
at Object.throw_ [as throw] (http://localhost:40909/dart_sdk.js:5067:11)
at js.JsObject._fromJs.callMethod (http://localhost:40909/dart_sdk.js:62058:19)
at main$ (http://localhost:40909/packages/responsive_check/main.dart.lib.js:602:16)
at main (http://localhost:40909/web_entrypoint.dart.lib.js:36:29)
at main.next ()
at http://localhost:40909/dart_sdk.js:40571:33
at _RootZone.runUnary (http://localhost:40909/dart_sdk.js:40441:59)
at _FutureListener.thenAwait.handleValue (http://localhost:40909/dart_sdk.js:35363:29)
at handleValueCallback (http://localhost:40909/dart_sdk.js:35931:49)
at Function._propagateToListeners (http://localhost:40909/dart_sdk.js:35969:17)
at _Future.new.[_completeWithValue] (http://localhost:40909/dart_sdk.js:35817:23)
at http://localhost:40909/dart_sdk.js:34998:46
at _RootZone.runUnary (http://localhost:40909/dart_sdk.js:40441:59)
at _FutureListener.then.handleValue (http://localhost:40909/dart_sdk.js:35363:29)
at handleValueCallback (http://localhost:40909/dart_sdk.js:35931:49)
at Function._propagateToListeners (http://localhost:40909/dart_sdk.js:35969:17)
at _Future.new.[_completeWithValue] (http://localhost:40909/dart_sdk.js:35817:23)
at async._AsyncCallbackEntry.new.callback (http://localhost:40909/dart_sdk.js:35838:35)
at Object._microtaskLoop (http://localhost:40909/dart_sdk.js:40708:13)
at _startMicrotaskLoop (http://localhost:40909/dart_sdk.js:40714:13)
at http://localhost:40909/dart_sdk.js:36191:9

Copy link

Hi Everyone, Hope you are doing good. I have one requirement.
Hi , Is it possible to load and display Three.js content in Flutter Web Application. Also I want interactions with JS to Flutter and Flutter to JS. There is multiple plugins are there to load web URL in Flutter Mobile App. I don't need for mobile.

Copy link

Heyy I am really impressed with your method but while compiling the flutter application, I am getting the following error.

: Error: Not found: 'dart:js'

Copy link

want to call app.js functions from web console and it will reflect in some flutter view. --- any suggestion how can we achieve this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants