请求未发送到服务器

I'm trying to build a log in page where I retrieve the user name and password values and store them in two variables that I send to my php file where I search wether the values exist or not and then in the onPressed button I handle both cases. I used both post method and Dio() but none of them work since my data is not sent. Here are both methods :

with Dio()

Future postData() async {
    Response response = await Dio().post(
        "http://192.168.0.117/testlocalhost/annonces/LogIn.php",
        data: {"User_name": userName, "password": password}
        );
}

with post

Future postData() async {
 var url = "http://192.168.0.117/testlocalhost/annonces/LogIn.php";
    http.post(
        url,
        body: {"userName": "$userName", "password": "$password"}
        );
 }

(userName and password are the varibales where I store the user's input)

here is the php file that searches wether the values exist or not

 <?php
   require('TestLocalHost.php');

   $makeQuery = "SELECT * FROM user WHERE User_name=userName  AND   
   password=password";

   $stamement = $connection->prepare($makeQuery);

   $stamement->execute();
 ?>

and here's the onPressed method

onPressed: () {
         userName = userNameController.text;
         password = passwordController.text;
             if (postData() == null) {print("ERROR!");}
             else{print("Done"):}
              },

I found a few typos in your code:

require('TestLocalHost.php');
$makeQuery = "SELECT * FROM user WHERE user_name='$userName' AND password='$password'";
$stamement = $connection->prepare($makeQuery);
$stamement->execute();

If you are creating Login/Register system I higly recomend this article to you (but lated change encryption algorithm to something other than MD5):
http://codewithawa.com/posts/complete-user-registration-system-using-php-and-mysql-database