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
dbbbef7e
Commit
dbbbef7e
authored
Sep 02, 2022
by
Arham Aulia Nugraha
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
register v1
belom validasi
parent
50052a1f
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
137 additions
and
41 deletions
+137
-41
user_api.dart
lib/api/user_api.dart
+24
-0
register.dart
lib/register.dart
+113
-41
No files found.
lib/api/user_api.dart
View file @
dbbbef7e
import
'dart:convert'
;
import
'package:http/http.dart'
as
http
;
Future
<
bool
>
signup
(
nama
,
email
,
nohp
,
username
,
password
)
async
{
final
response
=
await
http
.
post
(
Uri
.
parse
(
'http://10.3.4.250:8081/medapp/v1/api/user/save'
),
body:
jsonEncode
({
"namaUser"
:
nama
,
"emailUser"
:
email
,
"noHp"
:
nohp
,
"username"
:
username
,
"password"
:
password
}),
headers:
{
'Content-type'
:
'application/json; charset=UTF-8'
,
}
);
if
(
response
.
statusCode
==
200
)
{
return
true
;
}
else
{
return
false
;
}
// return response.statusCode;
}
\ No newline at end of file
lib/register.dart
View file @
dbbbef7e
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