H.R.
H.R.

Reputation: 506

how to get webview to work in dart

I want to use the webview tag in a chrome packaged app written in Dart,

I try to get the browser example inside the webview package to work

https://github.com/HannesRammer/webview

but when I set the webview attribute 'src', or call a function like 'back' using the jsinterop, it tells me unknown method back ... as far as I can see the package uses the correct jsinterop calls

maybe webview is not proper supported by jsObject, or what am I missing out ??

thanks :)

Upvotes: 1

Views: 261

Answers (1)

user2396155
user2396155

Reputation:

Make sure that you are running it as a Chrome App (right-click on the manifest.json in the Dart Editor and select "run as Chrome App"). The errors you describe sound like what you would see in a web app context, where the Chrome APIs are not available... also check that you have the webview permission in the manifest.json file.

Upvotes: 1

Related Questions