-
Notifications
You must be signed in to change notification settings - Fork 5
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
only Shows blank extension with error #1
Comments
There are two problems. The first problem is that the code presented should be in flutter_app.html, not in index.html. The second problem is that Chrome doesn't allow inline code so you have to put the code within the script tags in a separate js file and then link the new file in the script tag. <html>
<body>
<script src="newFile.js"></script>
<script src="main.dart.js" type="application/javascript"></script>
</body>
</html> And in newFile.js: if ("serviceWorker" in navigator) {
window.addEventListener("load", function () {
navigator.serviceWorker.register("flutter_service_worker.js");
});
} I hope this solves your problem. |
After some digging, I found my old code from when I tried to do this, and resurrected it. As expected, It did not work and I found I had the same error message as you. I guess I probably was frustrated and quit making the extension. My suggestion would be to find a more recent tutorial that is better maintained. I found a tutorial on the developer.chrome.com site here. I haven't tried it to see if it actually works, but it might yield better results. |
Thank you for the honest response. |
@shaw8wit did you get any solution? |
@abhaybabbar nope couldn't resolve the error |
Hello @gauravmehta13, @Locuroid, @shaw8wit, @abhaybabbar, Watch this YoutTube video of @Destiny-Ed. Here are the steps I followed:
And the Flutter application was displayed correctly which was not the case before. Only the error Have a nice day |
I also removed the use of the auxliary file |
Try this command
|
The text was updated successfully, but these errors were encountered: