var post = jsonEncode({
"coach_id":id,
"date":_value ,
"user_id":userId ,
"timeslots":duration ,
});
print(post);
var response = await http.post(url,headers:{"Content-Type":"application/json"}, body: post);
if (response.statusCode == 200) {
var responseJson = json.decode(response.body);
print(responseJson);
return response;
} else {
return null;
}
} catch (exception) {
print('exception---- $exception');
return null;
}
