Map dataSignUpEmployeer = {
'corporationName': employeer.getCorporationName(),
'webSiteName': employeer.getWebSiteName(),
'email': employeer.getEmail(),
'password': employeer.getPassword(),
};
String bodySignUpEmployeer = json.encode(dataSignUpEmployeer);
postDataSignUpEmployeer() async {
final response = await http.post(
Uri.parse(urlSignUp),
headers: {"Content-Type": "application/json"},
body: bodySignUpEmployeer,
);
return response.body;
}
response.body return JSON
your code is working as well i see so i think you wrong in a part of your code for get the success: true from your response body so maybe you need to authorize your user in header of post method with Token . to get back success true and get all of each user data. any way we should see your api url.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.