DEV Community

loading...

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

pratikbutani profile image Pratik Butani ・1 min read

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…

Discussion (0)

pic
Editor guide