title: flutter - android - http.get never returns in release mode
body: <p>I am writing a flutter app for android and ios. To log in, the app uses the <a href="https://pub.dev/packages/http" rel="noreferrer">http package</a> (version 0.12.2) : <code>http.Response response = await http.get(url);</code>.
  In iOS, everything works fine. In Android, the debug mode works also fine, however, if I build the apk and install the app from this release apk, the async method http.get never returns.
  I use Android 9 on a OnePlus 3 (OxygenOS 9.0.6).</p>
  <p>I am very new to flutter and can't figure this out.
  A similar <a href="https://github.com/flutter/flutter/issues/48678" rel="noreferrer">issue</a> is open in github but concerns flutter for web.</p>
  <p>Here is a minimal code to reproduce.
  To test it, you should build the apk (Build &gt; Flutter &gt; Build apk)), copy and paste the apk in your phone files, install the app from the apk, press the button <code>PRESS ME</code>, <code>done</code> will never be displayed.</p>
  <ul>
  <li>main.dart</li>
  </ul>
  <pre><code>import 'package:flutter/material.dart';
  import 'package:http/http.dart' as http;
  
  void main() {
    runApp(MyApp());
  }
  
  class MyApp extends StatelessWidget {
    // This widget is the root of your application.
    @override
    Widget build(BuildContext context) {
      return MaterialApp(
        title: 'Flutter Demo',
        theme: ThemeData(
          primarySwatch: Colors.blue,
          visualDensity: VisualDensity.adaptivePlatformDensity,
        ),
        home: MyHomePage(title: 'Test flutter'),
      );
    }
  }
  
  class MyHomePage extends StatefulWidget {
    MyHomePage({Key key, this.title}) : super(key: key);
    
    final String title;
  
    @override
    _MyHomePageState createState() =&gt; _MyHomePageState();
  }
  
  class _MyHomePageState extends State&lt;MyHomePage&gt; {
    String _status = &quot;Press the button&quot;;
  
    void _test() async {
      String url = &quot;http://dummy.restapiexample.com/api/v1/employees&quot;;
  
      // Send HTTP request to the server
      http.Response response = await http.get(
          url
      );
  
      setState(() {
        _status = &quot;done&quot;;
      });
    }
  
    @override
    Widget build(BuildContext context) {
      return Scaffold(
        appBar: AppBar(
          title: Text(widget.title),
        ),
        body: Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: &lt;Widget&gt;[
              // Test button
              RaisedButton(
                  onPressed: _test,
                  child: Text(
                    &quot;PRESS ME&quot;,
                  ),
                ),
              Text(
                '$_status',
              ),
            ],
          ),
        ),
      );
    }
  }
  </code></pre>
  <ul>
  <li>pubspec.yaml</li>
  </ul>
  <pre><code>name: flutter_test_app
  description: Test app for reproducing minimal example
  
  publish_to: 'none' # Remove this line if you wish to publish to pub.dev
  
  version: 1.0.0+1
  
  environment:
    sdk: &quot;&gt;=2.7.0 &lt;3.0.0&quot;
  
  dependencies:
    flutter:
      sdk: flutter
    http: ^0.12.2
  
    cupertino_icons: ^0.1.3
  
  dev_dependencies:
    flutter_test:
      sdk: flutter
  
  flutter:
    uses-material-design: true
  </code></pre>