Why do I get white screen when building flutter web

You need to run webdev serve command, it'll provide an address like localhost:8080 or 127.0.0.1:8080. I've attached a screenshot after running webdev serve for one of my Flutter Web Project. It says Serving web on http://127.0.0.1:8080 So you need to open that URL in Browser.

enter image description here


This answer was written when flutter-web was a separate project and webdev was the way to go for running your app.

Now you can use flutter run -d chrome to run it for Web.


For me seemed to have been a problem with antivirus and running flutter run -d chrome --release solved my problem.


You have to upload your files to the server and put them inside the root folder.

If you want to put them in other folder, you have to edit the "index.html" file to tell hem the folder.

For example: If you upload your files to "test" folder, you have to edit this line of "index.html":

<base href="/">

To

<base href="/test/">