Home > Mobile >  flutter web release showing blank screen
flutter web release showing blank screen

Time:08-16

I am trying to use release mode of my app. Here are the methods i have tried:

1-I executed flutter clean

2-I executed flutter build web --release

3-I executed flutter run -d chrome --release

On 3rd command it works fine: enter image description here

But when I open project/build/web/index.html it shows blank screen: enter image description here

Does anybody know the solution?

CodePudding user response:

In index.html you sould see a basehref. The flutter site is displayed only if the base href matches to te domain in which it is hosted. Try hosting it and adding the relevant base href. You can also delete this line and it should work as expected

CodePudding user response:

Open your web folder with vscode and open index.html, It will show like

enter image description here

And use Live Server extension

enter image description here

And then run by tapping Go live

enter image description here

  • Related