title: APIs won't load when published on Google Playstore
body: <p>So this is my first time publishing a Flutter app to the Google Play Store.  I wanted to create something simple so I could learn the entire process.  So I created a simple Trivia App.</p>
  <p>When I run the app from my phone or emulator (Android or iPhone) the free API that I'm using <a href="https://opentdb.com/api_category.php" rel="nofollow noreferrer">here</a> loads the categories without any issues.</p>
  <p><a href="https://i.stack.imgur.com/9JJgN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9JJgN.png" alt="What the app should look like" /></a></p>
  <p>The issue I'm having is when I publish the app to the Play Store, the API doesn't load and I don't even get an error message.  Just a blank screen.</p>
  <p><a href="https://i.stack.imgur.com/bhuAX.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bhuAX.jpg" alt="App when published to play store" /></a></p>
  <p>Here is the API service call in my app:</p>
  <pre><code> static Future&lt;List&lt;Category&gt;&gt; fetchCategories() async {
      const url = &quot;https://opentdb.com/api_category.php&quot;;
      var response;
      try {
        response = await http.get(url);
        if (response.statusCode == 200) {
          var jsonString = response.body;
          final Map&lt;String, dynamic&gt; responseData = json.decode(jsonString);
          var list = responseData['trivia_categories'] as List;
          var _items = list.map((i) =&gt; Category.fromJson(i)).toList();
          return _items;
        } else {
          return null;
        }
      } on Exception {
        throw response.statusCode;
      }
    }
  </code></pre>
  <p>And this is the code in the controller that calls the API's method.</p>
  <pre><code> void fetchCategories() async {
      // flag as loading.
      isLoading(true);
      try {
        //get categories from API server
        var categories = await ApiServices.fetchCategories();
        if (categories != null) {
          categories.forEach((Category categoryItem) async {
            // adjust data accordingly
            categoryItem.totalQuestions =
                await fetchCategoryCount(categoryItem.id);
            if (userDataController.data.read(categoryItem.id.toString()) !=
                null) {
              // get a list of answered questions from the device and count them
              List&lt;dynamic&gt; correctAnswers =
                  userDataController.data.read(categoryItem.id.toString());
              categoryItem.correctAnswers = correctAnswers.length;
            } else {
              categoryItem.correctAnswers = 0;
            }
            categoryTiles.add(categoryItem);
          });
        }
      } on Exception catch (e) {
        throw new Exception(&quot;An error occured fetching the data&quot;);
      } finally {
        isLoading(false);
      }
    }
  </code></pre>
  <p>Has anyone else ran into this issue?</p>