Commit 85d2ba63 authored by Arham Aulia Nugraha's avatar Arham Aulia Nugraha

register v2

belom validasi
parent 697b8c40
......@@ -54,11 +54,11 @@ class _RegisterState extends State<Register> {
Padding(
padding: EdgeInsets.only(
left: screenize.width * 0.33,
top: screenize.height * 0.07
),
child: Container(
width: screenize.width * 0.3,
height: screenize.height * 0.6,
width: screenize.width * 0.30,
height: screenize.height * 0.9,
alignment: Alignment.center,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(20),
......@@ -82,7 +82,7 @@ class _RegisterState extends State<Register> {
child: Container(
padding: EdgeInsets.only(
left: screenize.width * 0.045,
top: screenize.height * 0.02
top: screenize.height * 0.01
),
width: screenize.width * 0.36,
height: screenize.height * 0.8,
......@@ -107,7 +107,8 @@ class _RegisterState extends State<Register> {
const SizedBox(
width: 10,
),
const Text("Nama"),
const Text("Nama",
),
],
),
const SizedBox(height: 5,),
......@@ -126,6 +127,12 @@ class _RegisterState extends State<Register> {
borderRadius: BorderRadius.circular(5.0),
)
),
validator: (value){
if (value == null || value.isEmpty){
return "Nama tidak boleh kosong";
}
return null;
},
),
)
],
......@@ -154,6 +161,12 @@ class _RegisterState extends State<Register> {
child: TextFormField(
controller: emailController,
textAlign: TextAlign.start,
validator: (value){
if (value == null || value.isEmpty){
return "Email tidak boleh kosong";
}
return null;
},
decoration: InputDecoration(
labelText: "Email Valid",
hintStyle: const TextStyle(),
......@@ -189,6 +202,12 @@ class _RegisterState extends State<Register> {
child: TextFormField(
controller: phoneController,
textAlign: TextAlign.start,
validator: (value){
if (value == null || value.isEmpty){
return "Nomor handphone tidak boleh kosong";
}
return null;
},
decoration: InputDecoration(
labelText: "Nomor Handphone",
hintStyle: const TextStyle(),
......@@ -223,6 +242,12 @@ class _RegisterState extends State<Register> {
child: TextFormField(
controller: usernameController,
textAlign: TextAlign.start,
validator: (value){
if (value == null || value.isEmpty){
return "Username tidak boleh kosong";
}
return null;
},
decoration: InputDecoration(
labelText: "Username",
hintStyle: const TextStyle(),
......@@ -256,6 +281,12 @@ class _RegisterState extends State<Register> {
child: TextFormField(
controller: pwController,
textAlign: TextAlign.start,
validator: (value){
if (value == null || value.isEmpty){
return "Nama tidak boleh kosong";
}
return null;
},
obscureText: _isObscure,
decoration: InputDecoration(
labelText: "Password",
......
......@@ -2,8 +2,6 @@ import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
// import 'package:mcs_flutter/widget/botton.dart';
// import 'package:mcs_flutter/const/conts.dart';
import 'dart:convert';
import 'package:http/http.dart' as http;
import 'package:medapp_eksad/api/contact_api.dart';
import 'package:medapp_eksad/widget/button_color.dart';
......@@ -65,7 +63,7 @@ class ContactUs2 extends StatelessWidget {
flex: 1,
),
SizedBox(
height: screenSize.height * 0.3,
height: screenSize.height * 0.2,
child: Text(
'Go for the one who knows what they are doing, those who you share values with, '
'and those who will celebrate your success, and help you win over your biggest challenges. '
......
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