Commit 24c4d453 authored by Fikri's avatar Fikri

menambahkan action

parent 0ea56a1f
...@@ -30,3 +30,17 @@ Future<bool> savecontact(nama, email, nohp, message) async { ...@@ -30,3 +30,17 @@ Future<bool> savecontact(nama, email, nohp, message) async {
// return response.statusCode; // return response.statusCode;
} }
Future<bool> deleteContact(id) async {
final response = await http.delete(
Uri.parse('$cmd/contact/delete/$id'),
headers: {
'Content-type': 'application/json; charset=UTF-8',
},
);
if (response.statusCode == 200) {
return true;
} else {
return false;
}
}
This diff is collapsed.
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