Home > Software engineering >  Flutter Web Application Not Loading In Mobile Browser
Flutter Web Application Not Loading In Mobile Browser

Time:12-28

I have created a mobile application for my business using Flutter and it is published in PlayStore which is working fine.

Later I have converted the application to web-friendly and built it using Flutter Web and hosted it using Firebase Hosting. You can see the website here: https://youmenotes.com/immadekada/bambusa/#/

Now the problem which I am trying to resolve is, the website is loading as per expectation in desktop browsers, but if I try to open this URL using mobile phone browsers, it is stuck in a white screen. No clue on how to resolve it.

Please give me some light on the issue if anyone faced the same.

Thanks!


Note: I have another Flutter Web app (a demo app) that is hosted using the same way, and it is working perfectly alright on both PC and mobile browsers. The URL is this: https://youmenotes.com/immadekada/bambusa/game1/#/

CodePudding user response:

This was happened to me-

step 1: check if it is running fine on local for that run following command

flutter run -d web-server --web-port 8080 --web-hostname 0.0.0.0
and check form your mobile which is same network as your pc by entering url <pc's ip address:8080/>

step 2: build web with canvaskit render which is more suitable for mobile brower,

command: flutter build web --web-renderer canvaskit --release and release it.

CodePudding user response:

Add the INTERNET permission to your manifest file.

You have to add this line:

<uses-permission android:name="android.permission.INTERNET" /> 

outside the application tag in your AndroidManifest.xml

  • Related