DEV Community

Pratik Butani
Pratik Butani

Posted on

Answer: Bad state: Insecure HTTP is not allowed by platform:

For Android:

This behavior may be omitted following migration guide: https://flutter.dev/docs/release/breaking-changes/network-policy-ios-android.

or... Just add in android/app/src/main/AndroidManifest.xml:

android:usesCleartextTraffic="true" to <application /> also dont forget to take INTERNET PERMISSION:

<uses-permission android:name="android.permission.INTERNET" /> <!-- This Line --&gt
<application
        android:name="io.flutter.app.FlutterApplication"
        android:label="receipt"
        android:usesCleartextTraffic="true" <!-- This Line -->
        android:icon="@mipmap/ic_launcher">

For iOS:

Allow insecure/HTTP requests globally…

Top comments (1)

Collapse
 
fluttercorner profile image
FlutterCorner