Search code examples
flutterdartflutter-web

flutter web release showing blank screen


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?


Solution

  • 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