Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to open localhost in flutter webview

What I m trying:

Open a local host in flutter WebView. I am using This plugin and this project is running in Django with URL: http://127.0.0.1:8000/. I want to open this in my flutter app.

What I have tried:

After searching SO answers, URL: http://myIPaddress:8000/.

UPDATE

I am providing internet from mobile.

This is my local IP address

I am using http://192.168.43.55:8080/ is not working and also http://192.168.43.1:8080/

Any suggestion will work, thanks.

like image 953
Sandeep Sharma Avatar asked Jul 31 '26 05:07

Sandeep Sharma


1 Answers

Try with http://10.0.2.2:8000. If you get a cleartext error, in your AndroidManifest.xml add android:usesCleartextTraffic="true" under the application tag

like image 134
faithomotoso Avatar answered Aug 06 '26 09:08

faithomotoso