[Flutter] Unhandled Exception: Bad state: Insecure HTTP is not allowed by platform 에러 해결

에러 발생 원인 : 안전하지 않은 HTTP 연결은 iOS 및 Android에서 기본적으로 비활성화됨

공식 문서

https://flutter.dev/docs/release/breaking-changes/network-policy-ios-android


Android

AndroidManifest.xml

<application android:usesCleartextTraffic="true"/>

iOS

Info.plist

<key>NSAppTransportSecurity</key>
<dict>
    <key>NSAllowsArbitraryLoads</key>
    <true/>
</dict>

답글 남기기

이메일 주소는 공개되지 않습니다.