Reputation: 705
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.
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.
Upvotes: 7
Views: 7807
Reputation: 325
With Android emulator, you can access the localhost by providing the IPv4 with http:// that means http://192.168.43.55:8080/ should be accessible from your flutter webview application.
Upvotes: 0
Reputation: 454
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
Upvotes: 8