Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
medapp_eksad
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
qorri_di
medapp_eksad
Commits
580c14bb
Commit
580c14bb
authored
2 years ago
by
Fikri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
menambahkan consume api contact us dan send email di halaman public contact us
parent
6c281611
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
contact_us2.dart
lib/screen/contact_us/contact_us2.dart
+2
-2
small_contact_us2.dart
lib/screen_small/small_contact/small_contact_us2.dart
+2
-2
No files found.
lib/screen/contact_us/contact_us2.dart
View file @
580c14bb
...
@@ -260,8 +260,8 @@ class ContactUs2 extends StatelessWidget {
...
@@ -260,8 +260,8 @@ class ContactUs2 extends StatelessWidget {
if
(
_formKey
.
currentState
!.
validate
())
{
if
(
_formKey
.
currentState
!.
validate
())
{
final
response
=
await
sendEmail
(
final
response
=
await
sendEmail
(
nameController
.
value
.
text
,
nameController
.
value
.
text
,
emailController
.
value
.
text
,
phoneController
.
value
.
text
,
phoneController
.
value
.
text
,
emailController
.
value
.
text
,
messageController
.
value
.
text
);
messageController
.
value
.
text
);
ScaffoldMessenger
.
of
(
context
).
showSnackBar
(
ScaffoldMessenger
.
of
(
context
).
showSnackBar
(
response
==
200
response
==
200
...
@@ -302,7 +302,7 @@ class ContactUs2 extends StatelessWidget {
...
@@ -302,7 +302,7 @@ class ContactUs2 extends StatelessWidget {
final
url
=
Uri
.
parse
(
'https://api.emailjs.com/api/v1.0/email/send'
);
final
url
=
Uri
.
parse
(
'https://api.emailjs.com/api/v1.0/email/send'
);
const
serviceId
=
'service_7wwup8c'
;
const
serviceId
=
'service_7wwup8c'
;
const
templateId
=
'template_4u8rbur'
;
const
templateId
=
'template_4u8rbur'
;
const
userId
=
'
bzSFpP9flgDHE1D8dDLOP
'
;
const
userId
=
'
fF4-BJSJ11O-S3J0Z
'
;
final
response
=
await
http
.
post
(
url
,
final
response
=
await
http
.
post
(
url
,
headers:
{
headers:
{
'Content-Type'
:
'application/json'
'Content-Type'
:
'application/json'
...
...
This diff is collapsed.
Click to expand it.
lib/screen_small/small_contact/small_contact_us2.dart
View file @
580c14bb
...
@@ -277,9 +277,9 @@ class _ContactUs2_smallState extends State<ContactUs2_small> {
...
@@ -277,9 +277,9 @@ class _ContactUs2_smallState extends State<ContactUs2_small> {
Future
SendEmail
(
Future
SendEmail
(
String
name
,
String
phone
,
String
email
,
String
message
)
async
{
String
name
,
String
phone
,
String
email
,
String
message
)
async
{
final
url
=
Uri
.
parse
(
'https://api.emailjs.com/api/v1.0/email/send'
);
final
url
=
Uri
.
parse
(
'https://api.emailjs.com/api/v1.0/email/send'
);
const
serviceId
=
'service_7wwup8c'
;
const
serviceId
=
'service_7wwup8c'
;
const
templateId
=
'template_4u8rbur'
;
const
templateId
=
'template_4u8rbur'
;
const
userId
=
'
bzSFpP9flgDHE1D8dDLOP
'
;
const
userId
=
'
fF4-BJSJ11O-S3J0Z
'
;
final
response
=
await
http
.
post
(
url
,
final
response
=
await
http
.
post
(
url
,
headers:
{
headers:
{
'Content-Type'
:
'application/json'
'Content-Type'
:
'application/json'
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment