Commit eac0057e authored by Arham Aulia Nugraha's avatar Arham Aulia Nugraha

register v2

belom validasi
parent fc4559c5
...@@ -5,7 +5,7 @@ import 'package:medapp_eksad/model/user_model.dart'; ...@@ -5,7 +5,7 @@ import 'package:medapp_eksad/model/user_model.dart';
Future<bool> signUp(nama, email, nohp, username, password)async{ Future<bool> signUp(nama, email, nohp, username, password)async{
final response = await http.post( 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({ body: jsonEncode({
"namaUser": nama, "namaUser": nama,
"emailUser": email, "emailUser": email,
......
...@@ -108,7 +108,7 @@ class _RegisterState extends State<Register> { ...@@ -108,7 +108,7 @@ class _RegisterState extends State<Register> {
Row( Row(
children: [ children: [
Icon( Icon(
Icons.email_outlined, Icons.drive_file_rename_outline,
color: Colors.grey[500], color: Colors.grey[500],
size: screenize.width * 0.01, size: screenize.width * 0.01,
), ),
...@@ -116,6 +116,9 @@ class _RegisterState extends State<Register> { ...@@ -116,6 +116,9 @@ class _RegisterState extends State<Register> {
width: 10, width: 10,
), ),
const Text("Nama", const Text("Nama",
style: TextStyle(
fontSize: 13
),
), ),
], ],
), ),
...@@ -123,14 +126,16 @@ class _RegisterState extends State<Register> { ...@@ -123,14 +126,16 @@ class _RegisterState extends State<Register> {
Row( Row(
children: [ children: [
SizedBox( SizedBox(
height: 40, height: 60,
width: screenize.width * 0.2, width: screenize.width * 0.2,
child: TextFormField( child: TextFormField(
controller: nameController, controller: nameController,
textAlign: TextAlign.start, textAlign: TextAlign.start,
decoration: InputDecoration( decoration: InputDecoration(
labelText: "Nama Lengkap", labelText: "Nama Lengkap",
hintStyle: const TextStyle(), labelStyle: TextStyle(
fontSize: 13
),
border: OutlineInputBorder( border: OutlineInputBorder(
borderRadius: BorderRadius.circular(5.0), borderRadius: BorderRadius.circular(5.0),
) )
...@@ -146,7 +151,7 @@ class _RegisterState extends State<Register> { ...@@ -146,7 +151,7 @@ class _RegisterState extends State<Register> {
], ],
), ),
const SizedBox(height: 10,), const SizedBox(height: 5 ,),
Row( Row(
children: [ children: [
Icon( Icon(
...@@ -157,14 +162,18 @@ class _RegisterState extends State<Register> { ...@@ -157,14 +162,18 @@ class _RegisterState extends State<Register> {
const SizedBox( const SizedBox(
width: 10, width: 10,
), ),
const Text("Email"), const Text("Email",
style: TextStyle(
fontSize: 13
),
),
], ],
), ),
const SizedBox(height: 5,), const SizedBox(height: 5,),
Row( Row(
children: [ children: [
SizedBox( SizedBox(
height: 40, height: 60,
width: screenize.width * 0.2, width: screenize.width * 0.2,
child: TextFormField( child: TextFormField(
controller: emailController, controller: emailController,
...@@ -177,6 +186,9 @@ class _RegisterState extends State<Register> { ...@@ -177,6 +186,9 @@ class _RegisterState extends State<Register> {
}, },
decoration: InputDecoration( decoration: InputDecoration(
labelText: "Email Valid", labelText: "Email Valid",
labelStyle: TextStyle(
fontSize:13
),
hintStyle: const TextStyle(), hintStyle: const TextStyle(),
border: OutlineInputBorder( border: OutlineInputBorder(
borderRadius: BorderRadius.circular(5.0), borderRadius: BorderRadius.circular(5.0),
...@@ -187,25 +199,29 @@ class _RegisterState extends State<Register> { ...@@ -187,25 +199,29 @@ class _RegisterState extends State<Register> {
], ],
), ),
const SizedBox(height: 10,), const SizedBox(height: 5,),
Row( Row(
children: [ children: [
Icon( Icon(
Icons.email_outlined, Icons.phone_android,
color: Colors.grey[500], color: Colors.grey[500],
size: screenize.width * 0.01, size: screenize.width * 0.01,
), ),
const SizedBox( const SizedBox(
width: 10, width: 10,
), ),
const Text("No Hp"), const Text("No Hp",
style: TextStyle(
fontSize: 13
),
),
], ],
), ),
const SizedBox(height: 5,), const SizedBox(height: 5,),
Row( Row(
children: [ children: [
SizedBox( SizedBox(
height: 40, height: 60,
width: screenize.width * 0.2, width: screenize.width * 0.2,
child: TextFormField( child: TextFormField(
controller: phoneController, controller: phoneController,
...@@ -218,6 +234,9 @@ class _RegisterState extends State<Register> { ...@@ -218,6 +234,9 @@ class _RegisterState extends State<Register> {
}, },
decoration: InputDecoration( decoration: InputDecoration(
labelText: "Nomor Handphone", labelText: "Nomor Handphone",
labelStyle: TextStyle(
fontSize: 13
),
hintStyle: const TextStyle(), hintStyle: const TextStyle(),
border: OutlineInputBorder( border: OutlineInputBorder(
borderRadius: BorderRadius.circular(5.0), borderRadius: BorderRadius.circular(5.0),
...@@ -227,25 +246,29 @@ class _RegisterState extends State<Register> { ...@@ -227,25 +246,29 @@ class _RegisterState extends State<Register> {
) )
], ],
), ),
const SizedBox(height: 10,), const SizedBox(height: 5,),
Row( Row(
children: [ children: [
Icon( Icon(
Icons.email_outlined, Icons.account_circle_sharp,
color: Colors.grey[500], color: Colors.grey[500],
size: screenize.width * 0.01, size: screenize.width * 0.01,
), ),
const SizedBox( const SizedBox(
width: 10, width: 10,
), ),
const Text("Username"), const Text("Username",
style: TextStyle(
fontSize: 13
),
),
], ],
), ),
const SizedBox(height: 5,), const SizedBox(height: 5,),
Row( Row(
children: [ children: [
SizedBox( SizedBox(
height: 40, height: 60,
width: screenize.width * 0.2, width: screenize.width * 0.2,
child: TextFormField( child: TextFormField(
controller: usernameController, controller: usernameController,
...@@ -258,6 +281,9 @@ class _RegisterState extends State<Register> { ...@@ -258,6 +281,9 @@ class _RegisterState extends State<Register> {
}, },
decoration: InputDecoration( decoration: InputDecoration(
labelText: "Username", labelText: "Username",
labelStyle: TextStyle(
fontSize: 13
),
hintStyle: const TextStyle(), hintStyle: const TextStyle(),
border: OutlineInputBorder( border: OutlineInputBorder(
borderRadius: BorderRadius.circular(5.0), borderRadius: BorderRadius.circular(5.0),
...@@ -268,23 +294,27 @@ class _RegisterState extends State<Register> { ...@@ -268,23 +294,27 @@ class _RegisterState extends State<Register> {
], ],
), ),
const SizedBox(height: 10,), const SizedBox(height: 5,),
Row( Row(
children: [ children: [
Icon( Icon(
Icons.email_outlined, Icons.vpn_key_off_sharp,
color: Colors.grey[500], color: Colors.grey[500],
size: screenize.width * 0.01, size: screenize.width * 0.01,
), ),
const SizedBox( const SizedBox(
width: 10, width: 10,
), ),
const Text("Password"), const Text("Password",
style: TextStyle(
fontSize: 13
),
),
], ],
), ),
const SizedBox(height: 5,), const SizedBox(height: 5,),
SizedBox( SizedBox(
height: 40, height: 60,
width: screenize.width * 0.2, width: screenize.width * 0.2,
child: TextFormField( child: TextFormField(
controller: pwController, controller: pwController,
...@@ -298,6 +328,9 @@ class _RegisterState extends State<Register> { ...@@ -298,6 +328,9 @@ class _RegisterState extends State<Register> {
obscureText: _isObscure, obscureText: _isObscure,
decoration: InputDecoration( decoration: InputDecoration(
labelText: "Password", labelText: "Password",
labelStyle: TextStyle(
fontSize: 13
),
suffixIcon: IconButton( suffixIcon: IconButton(
icon: Icon(_isObscure icon: Icon(_isObscure
? Icons.visibility ? Icons.visibility
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment