Flutter Web App Blank Screen in Release mode
Asked Answered
S

2

3

I have a Flutter Web App which renders just fine on running flutter run -d chrome But if I run flutter run -d chrome --release It gives me a blank screen.

How should I sort out this issue?

Scraper answered 23/8, 2020 at 8:50 Comment(0)
E
1
flutter build web 

use this code

Endemic answered 23/8, 2020 at 8:59 Comment(5)
I have already tried flutter build web & flutter build web --release & then running flutter run still result is same. The web app works properly in debug mode but not in release mode.Scraper
@user7856586 Unfortunately NoScraper
@RahulKumarJha I deleted the project and then downloaded it againNadean
@RahulKumarJha yesNadean
did you solve the issue?Orientation
B
0
flutter create .

you should see now web folder in your project inside web folder under index.html comment below code(you will find it inside head tags)

<base href="$FLUTTER_BASE_HREF"> 

this will fix your blank screen problems

Bharal answered 19/12, 2023 at 18:8 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.