Commit d65976f2 authored by Budi Prasetyo's avatar Budi Prasetyo
parents 34fbd5f8 697b8c40
......@@ -19,6 +19,7 @@ Future savecontact(nama, email, nohp, message) async {
// } else {
// return false;
// }
return response.statusCode;
}
Future<List<contact>> showcontact() async {
......
import 'dart:convert';
import 'package:http/http.dart' as http;
Future<bool> signup(nama, email, nohp, username, password)async{
final response = await http.post(
Uri.parse('http://10.3.4.250:8081/medapp/v1/api/user/save'),
body: jsonEncode({
"namaUser": nama,
"emailUser": email,
"noHp": nohp,
"username": username,
"password": password}),
headers: {
'Content-type' : 'application/json; charset=UTF-8',
}
);
if (response.statusCode == 200) {
return true;
} else {
return false;
}
// return response.statusCode;
}
\ No newline at end of file
This diff is collapsed.
......@@ -249,7 +249,6 @@ class _ContactUs2_smallState extends State<ContactUs2_small> {
Text('Failed to send message!'),
backgroundColor: Colors.red),
);
nameController.clear();
phoneController.clear();
emailController.clear();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment