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
eac0057e
Commit
eac0057e
authored
Sep 06, 2022
by
Arham Aulia Nugraha
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
register v2
belom validasi
parent
fc4559c5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
52 additions
and
19 deletions
+52
-19
user_api.dart
lib/api/user_api.dart
+1
-1
register.dart
lib/register.dart
+51
-18
No files found.
lib/api/user_api.dart
View file @
eac0057e
...
...
@@ -5,7 +5,7 @@ import 'package:medapp_eksad/model/user_model.dart';
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/signup'
),
Uri
.
parse
(
'http://10.
107.203.242
:8081/medapp/v1/api/user/signup'
),
body:
jsonEncode
({
"namaUser"
:
nama
,
"emailUser"
:
email
,
...
...
lib/register.dart
View file @
eac0057e
...
...
@@ -108,7 +108,7 @@ class _RegisterState extends State<Register> {
Row
(
children:
[
Icon
(
Icons
.
email_outlined
,
Icons
.
drive_file_rename_outline
,
color:
Colors
.
grey
[
500
],
size:
screenize
.
width
*
0.01
,
),
...
...
@@ -116,6 +116,9 @@ class _RegisterState extends State<Register> {
width:
10
,
),
const
Text
(
"Nama"
,
style:
TextStyle
(
fontSize:
13
),
),
],
),
...
...
@@ -123,14 +126,16 @@ class _RegisterState extends State<Register> {
Row
(
children:
[
SizedBox
(
height:
4
0
,
height:
6
0
,
width:
screenize
.
width
*
0.2
,
child:
TextFormField
(
controller:
nameController
,
textAlign:
TextAlign
.
start
,
decoration:
InputDecoration
(
labelText:
"Nama Lengkap"
,
hintStyle:
const
TextStyle
(),
labelStyle:
TextStyle
(
fontSize:
13
),
border:
OutlineInputBorder
(
borderRadius:
BorderRadius
.
circular
(
5.0
),
)
...
...
@@ -146,7 +151,7 @@ class _RegisterState extends State<Register> {
],
),
const
SizedBox
(
height:
10
,),
const
SizedBox
(
height:
5
,),
Row
(
children:
[
Icon
(
...
...
@@ -157,14 +162,18 @@ class _RegisterState extends State<Register> {
const
SizedBox
(
width:
10
,
),
const
Text
(
"Email"
),
const
Text
(
"Email"
,
style:
TextStyle
(
fontSize:
13
),
),
],
),
const
SizedBox
(
height:
5
,),
Row
(
children:
[
SizedBox
(
height:
4
0
,
height:
6
0
,
width:
screenize
.
width
*
0.2
,
child:
TextFormField
(
controller:
emailController
,
...
...
@@ -177,6 +186,9 @@ class _RegisterState extends State<Register> {
},
decoration:
InputDecoration
(
labelText:
"Email Valid"
,
labelStyle:
TextStyle
(
fontSize:
13
),
hintStyle:
const
TextStyle
(),
border:
OutlineInputBorder
(
borderRadius:
BorderRadius
.
circular
(
5.0
),
...
...
@@ -187,25 +199,29 @@ class _RegisterState extends State<Register> {
],
),
const
SizedBox
(
height:
10
,),
const
SizedBox
(
height:
5
,),
Row
(
children:
[
Icon
(
Icons
.
email_outline
d
,
Icons
.
phone_androi
d
,
color:
Colors
.
grey
[
500
],
size:
screenize
.
width
*
0.01
,
),
const
SizedBox
(
width:
10
,
),
const
Text
(
"No Hp"
),
const
Text
(
"No Hp"
,
style:
TextStyle
(
fontSize:
13
),
),
],
),
const
SizedBox
(
height:
5
,),
Row
(
children:
[
SizedBox
(
height:
4
0
,
height:
6
0
,
width:
screenize
.
width
*
0.2
,
child:
TextFormField
(
controller:
phoneController
,
...
...
@@ -218,6 +234,9 @@ class _RegisterState extends State<Register> {
},
decoration:
InputDecoration
(
labelText:
"Nomor Handphone"
,
labelStyle:
TextStyle
(
fontSize:
13
),
hintStyle:
const
TextStyle
(),
border:
OutlineInputBorder
(
borderRadius:
BorderRadius
.
circular
(
5.0
),
...
...
@@ -227,25 +246,29 @@ class _RegisterState extends State<Register> {
)
],
),
const
SizedBox
(
height:
10
,),
const
SizedBox
(
height:
5
,),
Row
(
children:
[
Icon
(
Icons
.
email_outlined
,
Icons
.
account_circle_sharp
,
color:
Colors
.
grey
[
500
],
size:
screenize
.
width
*
0.01
,
),
const
SizedBox
(
width:
10
,
),
const
Text
(
"Username"
),
const
Text
(
"Username"
,
style:
TextStyle
(
fontSize:
13
),
),
],
),
const
SizedBox
(
height:
5
,),
Row
(
children:
[
SizedBox
(
height:
4
0
,
height:
6
0
,
width:
screenize
.
width
*
0.2
,
child:
TextFormField
(
controller:
usernameController
,
...
...
@@ -258,6 +281,9 @@ class _RegisterState extends State<Register> {
},
decoration:
InputDecoration
(
labelText:
"Username"
,
labelStyle:
TextStyle
(
fontSize:
13
),
hintStyle:
const
TextStyle
(),
border:
OutlineInputBorder
(
borderRadius:
BorderRadius
.
circular
(
5.0
),
...
...
@@ -268,23 +294,27 @@ class _RegisterState extends State<Register> {
],
),
const
SizedBox
(
height:
10
,),
const
SizedBox
(
height:
5
,),
Row
(
children:
[
Icon
(
Icons
.
email_outlined
,
Icons
.
vpn_key_off_sharp
,
color:
Colors
.
grey
[
500
],
size:
screenize
.
width
*
0.01
,
),
const
SizedBox
(
width:
10
,
),
const
Text
(
"Password"
),
const
Text
(
"Password"
,
style:
TextStyle
(
fontSize:
13
),
),
],
),
const
SizedBox
(
height:
5
,),
SizedBox
(
height:
4
0
,
height:
6
0
,
width:
screenize
.
width
*
0.2
,
child:
TextFormField
(
controller:
pwController
,
...
...
@@ -298,6 +328,9 @@ class _RegisterState extends State<Register> {
obscureText:
_isObscure
,
decoration:
InputDecoration
(
labelText:
"Password"
,
labelStyle:
TextStyle
(
fontSize:
13
),
suffixIcon:
IconButton
(
icon:
Icon
(
_isObscure
?
Icons
.
visibility
...
...
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