Home > Net >  Flutter web project don't work on hosting
Flutter web project don't work on hosting

Time:10-18

During coding ( flutter web ) on computer, all work fine, I run website on google in debugging, and there not any problem, when I make flutter build web --release, and upload files to 000webhost, there nothing.. only white screen.

CodePudding user response:

Checkout this answer

It usually happens because of improper placement of firebase JS SDK scripts. You have to setup the SDK before the script tag with main.dart.js.

CodePudding user response:

Update the <base href="/"> tag in web/index.html to the path where your app is hosted. For example, to host your Flutter app at myapp.dev/flutter_app, change this tag to <base href="/flutter_app/">.

or you can even delete this line and it will work.

reference : Hosting a Flutter app at a non-root location

  • Related