Benjamin Mahmic
Benjamin Mahmic

Reputation: 124

Flutter web project don't work on hosting

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.

Upvotes: 0

Views: 1536

Answers (2)

Kaushik Chandru
Kaushik Chandru

Reputation: 17732

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

Upvotes: 1

sidrao2006
sidrao2006

Reputation: 1328

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.

Upvotes: 2

Related Questions