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
6c281611
Commit
6c281611
authored
Sep 13, 2022
by
qorri_di
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
contact_api.dart
parent
37c031b2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
contact_api.dart
lib/api/contact_api.dart
+7
-7
No files found.
lib/api/contact_api.dart
View file @
6c281611
...
@@ -6,7 +6,7 @@ import 'package:medapp_eksad/model/contact_model.dart';
...
@@ -6,7 +6,7 @@ import 'package:medapp_eksad/model/contact_model.dart';
var
cmd
=
'https://dmsdev-api.eksad.com/gateway/medapp/v1/cmd'
;
var
cmd
=
'https://dmsdev-api.eksad.com/gateway/medapp/v1/cmd'
;
var
qry
=
'https://dmsdev-api.eksad.com/gateway/medapp/v1/qry'
;
var
qry
=
'https://dmsdev-api.eksad.com/gateway/medapp/v1/qry'
;
Future
savecontact
(
nama
,
email
,
nohp
,
message
)
async
{
Future
<
bool
>
savecontact
(
nama
,
email
,
nohp
,
message
)
async
{
final
response
=
await
http
.
post
(
final
response
=
await
http
.
post
(
Uri
.
parse
(
'
$cmd
/contact/save'
),
Uri
.
parse
(
'
$cmd
/contact/save'
),
body:
jsonEncode
({
body:
jsonEncode
({
...
@@ -17,12 +17,12 @@ Future savecontact(nama, email, nohp, message) async {
...
@@ -17,12 +17,12 @@ Future savecontact(nama, email, nohp, message) async {
headers:
{
headers:
{
'Content-type'
:
'application/json; charset=UTF-8'
,
'Content-type'
:
'application/json; charset=UTF-8'
,
});
});
//
if (response.statusCode == 200) {
if
(
response
.
statusCode
==
200
)
{
//
return true;
return
true
;
//
} else {
}
else
{
//
return false;
return
false
;
//
}
}
return
response
.
statusCode
;
//
return response.statusCode;
}
}
Future
<
List
<
contact
>>
showcontact
()
async
{
Future
<
List
<
contact
>>
showcontact
()
async
{
...
...
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