title: Creating flutter Json Login form with user Basic authentication
body: <p>Have been stuck for quite a while on this step. can someone show me how to send a request such that upon pressing the "login" button a new instance of a user with Basic authentication is created. i would love to understand how to know how the headers are arranged to access the url database</p>
  
  <pre><code>     void Login() {
      final form = formKey.currentState;
      if (form.validate()) {
        form.save();
        makePost();
      }
    }
  
      second part my json methond
  
       Future&lt;Post&gt; makePost() async {
      String Username = "denisPos";
      String Password = "moV4b90WqpHfghghsg";
      final response = await http.post('http://.60.4546.109:4520/postRequest',
          headers: {HttpHeaders.authorizationHeader: '$Password:$Username:$url'});
      final responseJson = json.decode(response.body);
  
      return Post.fromJson(responseJson);
    }
  
  
      class Post {
    final String phone;
  
    final String password;
    final String body;
  
    Post({this.phone, this.password, this.body});
  
    factory Post.fromJson(Map&lt;String, dynamic&gt; json) {
      return Post(
        phone: json['phone'],
        password: json['password'],
        body: json['body'],
      );
    }
  }
  </code></pre>