Home > Mobile >  Flutter web white screen : can't build flutter web
Flutter web white screen : can't build flutter web

Time:01-06

Chrome console output Often I this problem when building flutter web app

I try to run flutter app on chrome it runs smoothly but when I build using "flutter build web" or "flutter build web --release" and the open the compiled web app by creating local host or directly using the index.html file white screen appears and when I see the console output there are errors as it is on the image.

CodePudding user response:

To run your project on web all you have to do is run this command flutter run -d chrome in your terminal and it will run your project in chrome.

To know more about Flutter Web you can checkout the official doc here

CodePudding user response:

Try change base url in index.html.

If will run sub directory, just type sub directory name

Example:

Project Link : https://www.example.com/myapp

root_dir/index.html

<base href="/myapp/">
  • Related