Skip to content

Instantly share code, notes, and snippets.

@adityadees
Created July 30, 2021 01:30
Show Gist options
  • Save adityadees/20dd1b6f2d5d74aa56679c0d09ae42f6 to your computer and use it in GitHub Desktop.
Save adityadees/20dd1b6f2d5d74aa56679c0d09ae42f6 to your computer and use it in GitHub Desktop.
FLUTTER WEB CORS
1- Go to flutter\bin\cache and remove a file named: flutter_tools.stamp
2- Go to flutter\packages\flutter_tools\lib\src\web and open the file chrome.dart.
3- Find '--disable-extensions'
4- Add '--disable-web-security'
@praharshbhatt
Copy link

run/compile your Flutter web project using web-renderer. This should solve the issue both locally and remotely:

flutter run -d chrome --web-renderer html
flutter build web --web-renderer html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment