2

By default, Android Pie will request that apps use HTTPS connections instead of HTTP. So unable to hit restful API in HTTP

1 Answer 1

2

https://android-developers.googleblog.com/2018/04/protecting-users-with-tls-by-default-in.html?m=1 explains how to opt out for a specific domain or arbitrary domains

<network-security-config>
    <domain-config cleartextTrafficPermitted="true">
        <domain includeSubdomains="true">insecure.example.com</domain>
        <domain includeSubdomains="true">insecure.cdn.example.com</domain>
    </domain-config>
</network-security-config>

I'm not sure the limitation introducted in Android Pie and the opt-out mentioned here apply to HTTP connections made using dart:io.

Sign up to request clarification or add additional context in comments.

2 Comments

I was aware with this in case of native android development but now i have implemented the same in case of Flutter app Thank you bro...
does this works for you ? I have added and it doesn't affect

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.