Search code examples
flutterdartvisual-studio-codemobilepubspec.yaml

Images not loading in my VS Code project folder. It says failed to register a service worker


The images in my project are not loading. I keep getting this error anytime I try to view it. I can't run my projects:

Error loading webview: Error: Could not register service workers: InvalidStateError: Failed to register a ServiceWorker: The document is in an invalid state..

This is the error I got


Solution

  • can not put assets folder inside lib, lib folder is only for .dart filesuse this