Commit 580c14bb authored by Fikri's avatar Fikri

menambahkan consume api contact us dan send email di halaman public contact us

parent 6c281611
......@@ -260,8 +260,8 @@ class ContactUs2 extends StatelessWidget {
if (_formKey.currentState!.validate()) {
final response = await sendEmail(
nameController.value.text,
emailController.value.text,
phoneController.value.text,
emailController.value.text,
messageController.value.text);
ScaffoldMessenger.of(context).showSnackBar(
response == 200
......@@ -302,7 +302,7 @@ class ContactUs2 extends StatelessWidget {
final url = Uri.parse('https://api.emailjs.com/api/v1.0/email/send');
const serviceId = 'service_7wwup8c';
const templateId = 'template_4u8rbur';
const userId = 'bzSFpP9flgDHE1D8dDLOP';
const userId = 'fF4-BJSJ11O-S3J0Z';
final response = await http.post(url,
headers: {
'Content-Type': 'application/json'
......
......@@ -279,7 +279,7 @@ class _ContactUs2_smallState extends State<ContactUs2_small> {
final url = Uri.parse('https://api.emailjs.com/api/v1.0/email/send');
const serviceId = 'service_7wwup8c';
const templateId = 'template_4u8rbur';
const userId = 'bzSFpP9flgDHE1D8dDLOP';
const userId = 'fF4-BJSJ11O-S3J0Z';
final response = await http.post(url,
headers: {
'Content-Type': 'application/json'
......
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