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
8c93b59a
Commit
8c93b59a
authored
Sep 14, 2022
by
Fikri
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
menambahkan get api pada halaman dashboard contact us
parent
580c14bb
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
162 additions
and
130 deletions
+162
-130
contact_api.dart
lib/api/contact_api.dart
+5
-9
admin_contact.dart
lib/dashboard/admin/admin_contact.dart
+156
-117
login.dart
lib/login.dart
+1
-4
No files found.
lib/api/contact_api.dart
View file @
8c93b59a
...
@@ -6,6 +6,11 @@ import 'package:medapp_eksad/model/contact_model.dart';
...
@@ -6,6 +6,11 @@ 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
<
List
<
dynamic
>>
getcontact
()
async
{
var
response
=
await
http
.
get
(
Uri
.
parse
(
'
$qry
/contact/get'
));
return
jsonDecode
(
response
.
body
)[
'data'
];
}
Future
<
bool
>
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'
),
...
@@ -25,12 +30,3 @@ Future<bool> savecontact(nama, email, nohp, message) async {
...
@@ -25,12 +30,3 @@ Future<bool> savecontact(nama, email, nohp, message) async {
// return response.statusCode;
// return response.statusCode;
}
}
Future
<
List
<
contact
>>
showcontact
()
async
{
var
response
=
await
http
.
get
(
Uri
.
parse
(
'
$qry
/contact/get'
));
var
resultJson
=
jsonDecode
(
response
.
body
)[
'data'
];
List
<
contact
>
contactlist
=
await
resultJson
.
map
<
contact
>((
json
)
=>
contact
.
fromJson
(
json
))
.
toList
();
return
contactlist
;
}
\ No newline at end of file
lib/dashboard/admin/admin_contact.dart
View file @
8c93b59a
This diff is collapsed.
Click to expand it.
lib/login.dart
View file @
8c93b59a
...
@@ -259,10 +259,7 @@ class _SignInState extends State<SignIn> {
...
@@ -259,10 +259,7 @@ class _SignInState extends State<SignIn> {
);
);
}
else
if
(
_usernamecontroller
.
value
.
text
==
'admin@admin.com'
&&
}
else
if
(
_usernamecontroller
.
value
.
text
==
'admin@admin.com'
&&
_passwordcontroller
.
value
.
text
==
'administrator'
)
{
_passwordcontroller
.
value
.
text
==
'administrator'
)
{
Navigator
.
pushNamed
(
context
,
'/admin'
);
Navigator
.
pushNamed
(
context
,
'/dashboard'
);
}
else
if
(
_usernamecontroller
.
value
.
text
==
'client@client.com'
&&
_passwordcontroller
.
value
.
text
==
'clientpage'
)
{
Navigator
.
pushNamed
(
context
,
'/client'
);
}
else
{
}
else
{
showDialog
<
String
>(
showDialog
<
String
>(
context:
context
,
context:
context
,
...
...
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