SHARE
TWEET

Untitled

a guest Jun 17th, 2019 79 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. _sumbit()async{
  2.     var params = {
  3.       "id_register" : "$idReg",
  4.       "nama_ayah": "$namaAyah",
  5.       "pekerjaan_ayah": "$pekerjaanAyah",
  6.       "agama_ayah": "$agamaAyah",
  7.       "alamat_ayah": "$alamatAyah",
  8.     };
  9. var response = await http.post(Uri.encodeFull(BaseUrl.ayah),
  10.         body: json.encode(params), headers: {"Accept": "application/json"});
  11.     final data = jsonDecode(response.body);
  12.     int value = data['value'];
  13.     String pesan = data['message'];
  14.     if (value == 1) {
  15.       print(pesan);
  16.     } else {
  17.       print(print);
  18.     }
  19.   }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top