title: How to solve insecure http not allowed by platform flutter?
body: <p>I am trying to fetch some data from my custom made rest api and i am having a lot of trouble with this error. I even tried the google official migration guide.</p>
  <pre><code>import 'package:flutter/material.dart';
  import 'dart:convert';
  import 'package:http/http.dart' as http;
  
  class Home extends StatefulWidget {
    @override
    _HomeState createState() =&gt; _HomeState();
  }
  
  class _HomeState extends State&lt;Home&gt; {
    String PROTOCOL = &quot;http&quot;;
    String DOMAIN = &quot;192.168.0.5:5000&quot;;
  
    Future&lt;List&lt;dynamic&gt;&gt; fetchUsers() async {
      var url = &quot;$PROTOCOL://$DOMAIN/posts&quot;;
      var result = await http.get(url);
      print(result);
      return json.decode(result.body);
    }
  
    @override
    Widget build(BuildContext context) {
      fetchUsers();
      return Scaffold(
        appBar: AppBar(),
        body: Container(
          child: FutureBuilder&lt;List&lt;dynamic&gt;&gt;(
            future: fetchUsers(),
            builder: (BuildContext context, AsyncSnapshot snapshot) {
              if (snapshot.hasData) {
                return ListView.builder(
                  itemBuilder: (BuildContext context, int index) {
                    return Text(snapshot.data[index]['description']);
                  },
                  itemCount: snapshot.data.length,
                );
              } else
                return Container();
            },
          ),
        ),
      );
  </code></pre>
  <p>My server is up and running and working good with postman but facing troubles with flutter.Need some serious help here!</p>