Commit 5c06fa7d authored by Fikri's avatar Fikri

merapikan register_pic

parent 5317d055
......@@ -9,7 +9,6 @@ class RegisterPic extends StatefulWidget {
}
class _RegisterPicState extends State<RegisterPic> {
bool _isObscure = true;
final _formKey = GlobalKey<FormState>();
......@@ -30,21 +29,19 @@ class _RegisterPicState extends State<RegisterPic> {
body: Container(
height: screenize.height,
width: screenize.width,
decoration: const BoxDecoration(
image: DecorationImage(
image: AssetImage("assets/images/bg-medapp.png"),
fit: BoxFit.fill,
)
),
decoration: const BoxDecoration(
image: DecorationImage(
image: AssetImage("assets/images/bg-medapp.png"),
fit: BoxFit.fill,
)),
padding: EdgeInsets.only(
left: screenize.width * 0.13,
top: screenize.height * 0.05,
bottom: screenize.height * 0.05
),
left: screenize.width * 0.13,
top: screenize.height * 0.05,
bottom: screenize.height * 0.05),
child: Stack(
children: [
Padding(
padding: EdgeInsets.symmetric(vertical: screenize.height*0.15),
padding: EdgeInsets.symmetric(vertical: screenize.height * 0.15),
// child: Container(
// decoration: BoxDecoration(
// color: const Color.fromARGB(255, 10, 116, 255),
......@@ -57,15 +54,15 @@ class _RegisterPicState extends State<RegisterPic> {
// ),
// ),
child: Image.asset(
"assets/logo/logo-eksad.png",
"assets/logo/logo-eksad.png",
),
),
Padding(
padding: EdgeInsets.only(
left: screenize.width * 0.35,
),
padding: EdgeInsets.only(
left: screenize.width * 0.35,
),
child: Container(
width: screenize.width * 0.30,
width: screenize.width * 0.50,
height: screenize.height * 1,
alignment: Alignment.center,
decoration: BoxDecoration(
......@@ -77,23 +74,24 @@ class _RegisterPicState extends State<RegisterPic> {
),
boxShadow: [
BoxShadow(
color: const Color.fromARGB(255, 10, 116, 255).withAlpha(60),
color:
const Color.fromARGB(255, 10, 116, 255).withAlpha(60),
blurRadius: 15.0,
spreadRadius: 20.0,
offset: const Offset(
0.0,
3.0,
),
),],
),
],
),
child: Form(
key: _formKey,
child: Container(
padding: EdgeInsets.only(
left: screenize.width * 0.045,
top: screenize.height * 0.01
),
width: screenize.width * 0.36,
left: screenize.width * 0.045,
top: screenize.height * 0.01),
width: screenize.width * 0.50,
height: screenize.height * 1,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
......@@ -101,317 +99,360 @@ class _RegisterPicState extends State<RegisterPic> {
children: [
const Spacer(),
Container(
padding: EdgeInsets.only(
left: screenize.width * 0.05
),
padding:
EdgeInsets.only(left: screenize.width * 0.15),
height: screenize.width * 0.03,
child: Image.asset("assets/logo/medapp-logo.png"),
),
const SizedBox(height: 20,),
// ===============nama rs=============
Row(
children: [
Icon(
Icons.drive_file_rename_outline,
color: Colors.grey[500],
size: screenize.width * 0.01,
),
const SizedBox(
width: 10,
),
const Text("Nama Rumah Sakit",
style: TextStyle(
fontSize: 13
),
),
],
const SizedBox(
height: 20,
),
const SizedBox(height: 5,),
Row(
children: [
SizedBox(
height: 60,
width: screenize.width * 0.2,
child: TextFormField(
controller: nameRSController,
textAlign: TextAlign.start,
decoration: InputDecoration(
labelText: "Nama Rumah Sakit",
labelStyle: TextStyle(
fontSize: 13
),
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(5.0),
)
Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
// ===============nama rs=============
Row(
children: [
Icon(
Icons.drive_file_rename_outline,
color: Colors.grey[500],
size: screenize.width * 0.01,
),
const SizedBox(
width: 10,
),
const Text(
"Nama Rumah Sakit",
style: TextStyle(fontSize: 13),
),
],
),
validator: (value){
if (value == null || value.isEmpty){
return "Nama Rumah Sakit tidak boleh kosong";
}
return null;
},
),
)
],
),
// ===============akhir nama rs=============
const SizedBox(height: 5 ,),
// ===============telepon rs==========
Row(
children: [
Icon(
Icons.phone_android,
color: Colors.grey[500],
size: screenize.width * 0.01,
const SizedBox(
height: 5,
),
Row(
children: [
SizedBox(
height: 60,
width: screenize.width * 0.2,
child: TextFormField(
controller: nameRSController,
textAlign: TextAlign.start,
decoration: InputDecoration(
labelText: "Nama Rumah Sakit",
labelStyle: TextStyle(fontSize: 13),
border: OutlineInputBorder(
borderRadius:
BorderRadius.circular(5.0),
)),
validator: (value) {
if (value == null || value.isEmpty) {
return "Nama Rumah Sakit tidak boleh kosong";
}
return null;
},
),
)
],
),
// ===============akhir nama rs=============
],
),
const SizedBox(
width: 10,
),
const Text("No Telepon Rumah Sakit",
style: TextStyle(
fontSize: 13
),
width: 30,
),
],
),
const SizedBox(height: 5,),
Row(
children: [
SizedBox(
height: 60,
width: screenize.width * 0.2,
child: TextFormField(
controller: phoneRSController,
textAlign: TextAlign.start,
validator: (value){
if (value == null || value.isEmpty){
return "Nomor Telepon Rumah Sakit tidak boleh kosong";
}
return null;
},
decoration: InputDecoration(
labelText: "Nomor Telepon Rumah Sakit",
labelStyle: TextStyle(
fontSize: 13
Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
// ===============telepon rs==========
Row(
children: [
Icon(
Icons.phone_android,
color: Colors.grey[500],
size: screenize.width * 0.01,
),
const SizedBox(
width: 10,
),
hintStyle: const TextStyle(),
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(5.0),
const Text(
"No Telepon Rumah Sakit",
style: TextStyle(fontSize: 13),
),
],
),
const SizedBox(
height: 5,
),
Row(
children: [
SizedBox(
height: 60,
width: screenize.width * 0.2,
child: TextFormField(
controller: phoneRSController,
textAlign: TextAlign.start,
validator: (value) {
if (value == null || value.isEmpty) {
return "Nomor Telepon Rumah Sakit tidak boleh kosong";
}
return null;
},
decoration: InputDecoration(
labelText:
"Nomor Telepon Rumah Sakit",
labelStyle: TextStyle(fontSize: 13),
hintStyle: const TextStyle(),
border: OutlineInputBorder(
borderRadius:
BorderRadius.circular(5.0),
)),
),
)
],
),
),
)
],
),
// ===============akhir telepon rs==========
const SizedBox(height: 5,),
// ===============alamat rs==========
Row(
children: [
Icon(
Icons.phone_android,
color: Colors.grey[500],
size: screenize.width * 0.01,
),
const SizedBox(
width: 10,
),
const Text("Alamat Rumah Sakit",
style: TextStyle(
fontSize: 13
),
// ===============akhir telepon rs==========
],
),
],
),
const SizedBox(height: 5,),
Row(
children: [
SizedBox(
height: 60,
width: screenize.width * 0.2,
child: TextFormField(
controller: addressRSController,
textAlign: TextAlign.start,
validator: (value){
if (value == null || value.isEmpty){
return "Nomor Alamat Rumah Sakit tidak boleh kosong";
}
return null;
},
decoration: InputDecoration(
labelText: "Nomor Alamat Rumah Sakit",
labelStyle: TextStyle(
fontSize: 13
Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
// ===============alamat rs==========
Row(
children: [
Icon(
Icons.add_home_work_sharp,
color: Colors.grey[500],
size: screenize.width * 0.01,
),
const SizedBox(
width: 10,
),
const Text(
"Alamat Rumah Sakit",
style: TextStyle(fontSize: 13),
),
hintStyle: const TextStyle(),
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(5.0),
],
),
const SizedBox(
height: 5,
),
Row(
children: [
SizedBox(
height: 60,
width: screenize.width * 0.2,
child: TextFormField(
controller: addressRSController,
textAlign: TextAlign.start,
validator: (value) {
if (value == null || value.isEmpty) {
return "Nomor Alamat Rumah Sakit tidak boleh kosong";
}
return null;
},
decoration: InputDecoration(
labelText:
"Nomor Alamat Rumah Sakit",
labelStyle: TextStyle(fontSize: 13),
hintStyle: const TextStyle(),
border: OutlineInputBorder(
borderRadius:
BorderRadius.circular(5.0),
)),
),
)
],
),
),
)
],
),
// ===============akhir alamat rs==========
const SizedBox(height: 5,),
// ===============nama pic=============
Row(
children: [
Icon(
Icons.drive_file_rename_outline,
color: Colors.grey[500],
size: screenize.width * 0.01,
// ===============akhir alamat rs==========
],
),
const SizedBox(
width: 10,
),
const Text("Nama PIC",
style: TextStyle(
fontSize: 13
),
width: 30,
),
],
),
const SizedBox(height: 5,),
Row(
children: [
SizedBox(
height: 60,
width: screenize.width * 0.2,
child: TextFormField(
controller: namePICController,
textAlign: TextAlign.start,
decoration: InputDecoration(
labelText: "Nama PIC",
labelStyle: TextStyle(
fontSize: 13
),
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(5.0),
)
Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
// ===============nama pic=============
Row(
children: [
Icon(
Icons.drive_file_rename_outline,
color: Colors.grey[500],
size: screenize.width * 0.01,
),
const SizedBox(
width: 10,
),
const Text(
"Nama PIC",
style: TextStyle(fontSize: 13),
),
],
),
validator: (value){
if (value == null || value.isEmpty){
return "Nama PIC tidak boleh kosong";
}
return null;
},
),
)
],
),
// ===============akhir nama pic=============
const SizedBox(height: 5 ,),
// ===============telepon rs==========
Row(
children: [
Icon(
Icons.phone_android,
color: Colors.grey[500],
size: screenize.width * 0.01,
),
const SizedBox(
width: 10,
),
const Text("No Telepon PIC",
style: TextStyle(
fontSize: 13
),
const SizedBox(
height: 5,
),
Row(
children: [
SizedBox(
height: 60,
width: screenize.width * 0.2,
child: TextFormField(
controller: namePICController,
textAlign: TextAlign.start,
decoration: InputDecoration(
labelText: "Nama PIC",
labelStyle: TextStyle(fontSize: 13),
border: OutlineInputBorder(
borderRadius:
BorderRadius.circular(5.0),
)),
validator: (value) {
if (value == null || value.isEmpty) {
return "Nama PIC tidak boleh kosong";
}
return null;
},
),
)
],
),
// ===============akhir nama pic=============
],
),
],
),
const SizedBox(height: 5,),
Row(
children: [
SizedBox(
height: 60,
width: screenize.width * 0.2,
child: TextFormField(
controller: phonePICController,
textAlign: TextAlign.start,
validator: (value){
if (value == null || value.isEmpty){
return "Nomor Telepon PIC tidak boleh kosong";
}
return null;
},
decoration: InputDecoration(
labelText: "Nomor Telepon PIC",
labelStyle: TextStyle(
fontSize: 13
Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
// ===============telepon pic==========
Row(
children: [
Icon(
Icons.phone_android,
color: Colors.grey[500],
size: screenize.width * 0.01,
),
const SizedBox(
width: 10,
),
hintStyle: const TextStyle(),
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(5.0),
const Text(
"No Telepon PIC",
style: TextStyle(fontSize: 13),
),
],
),
const SizedBox(
height: 5,
),
Row(
children: [
SizedBox(
height: 60,
width: screenize.width * 0.2,
child: TextFormField(
controller: phonePICController,
textAlign: TextAlign.start,
validator: (value) {
if (value == null || value.isEmpty) {
return "Nomor Telepon PIC tidak boleh kosong";
}
return null;
},
decoration: InputDecoration(
labelText: "Nomor Telepon PIC",
labelStyle: TextStyle(fontSize: 13),
hintStyle: const TextStyle(),
border: OutlineInputBorder(
borderRadius:
BorderRadius.circular(5.0),
)),
),
)
],
),
),
)
],
),
// ===============akhir telepon pic==========
const SizedBox(height: 5,),
// ===============email pic==========
Row(
children: [
Icon(
Icons.email_outlined,
color: Colors.grey[500],
size: screenize.width * 0.01,
// ===============akhir telepon pic==========
],
),
const SizedBox(
width: 10,
width: 30,
),
const Text("Email PIC",
style: TextStyle(
fontSize: 13
),
),
],
),
const SizedBox(height: 5,),
Row(
children: [
SizedBox(
height: 60,
width: screenize.width * 0.2,
child: TextFormField(
controller: emailPICController,
textAlign: TextAlign.start,
validator: (value){
if (value == null || value.isEmpty){
return "Email PIC tidak boleh kosong";
}
return null;
},
decoration: InputDecoration(
labelText: "Email PIC",
labelStyle: TextStyle(
fontSize:13
Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
// ===============email pic==========
Row(
children: [
Icon(
Icons.email_outlined,
color: Colors.grey[500],
size: screenize.width * 0.01,
),
const SizedBox(
width: 10,
),
const Text(
"Email PIC",
style: TextStyle(fontSize: 13),
),
hintStyle: const TextStyle(),
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(5.0),
],
),
const SizedBox(
height: 5,
),
Row(
children: [
SizedBox(
height: 60,
width: screenize.width * 0.2,
child: TextFormField(
controller: emailPICController,
textAlign: TextAlign.start,
validator: (value) {
if (value == null || value.isEmpty) {
return "Email PIC tidak boleh kosong";
}
return null;
},
decoration: InputDecoration(
labelText: "Email PIC",
labelStyle: TextStyle(fontSize: 13),
hintStyle: const TextStyle(),
border: OutlineInputBorder(
borderRadius:
BorderRadius.circular(5.0),
)),
),
)
],
),
),
)
// ===============akhir email pic==========
],
),
],
),
// ===============akhir email pic==========
const SizedBox(height: 5,),
// ===============password==========
Row(
children: [
Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
// ===============password==========
Row(
children: [
Icon(
......@@ -467,67 +508,75 @@ class _RegisterPicState extends State<RegisterPic> {
),
),
// ===============akhir password==========
],
),
],
),
const Spacer(
flex: 4,
),
Row(
children: [
SizedBox(
height: 30,
width: screenize.width * 0.09,
child: ElevatedButton(
onPressed: (){
Navigator.pushNamed(context, '/login');
},
child: const Text("LOGIN"),
Container(
padding:
EdgeInsets.only(left: screenize.width * 0.10),
height: screenize.width * 0.03,
child: Row(
children: [
SizedBox(
height: 30,
width: screenize.width * 0.09,
child: ElevatedButton(
onPressed: () {
Navigator.pushNamed(context, '/login');
},
child: const Text("LOGIN"),
),
),
),
SizedBox(
width: screenize.width * 0.02,
),
SizedBox(
height: 30,
width: screenize.width * 0.09,
child: ElevatedButton(
onPressed: () {},
// onPressed: () async {
// if (_formKey.currentState!.validate()){
// final response = await signUp(
// nameRSController.value.text,
// phoneRSController.value.text,
// addressRSController.value.text,
// namePICController.value.text,
// phonePICController.value.text,
// emailPICController.value.text,
// passwordController.value.text);
// ScaffoldMessenger.of(context).showSnackBar(
// response == true
// ? const SnackBar(
// content: Text("Registrasi berhasil ! cek email untuk validasi"),
// backgroundColor: Colors.green,)
// : const SnackBar(
// content: Text("Registrasi gagal"),
// backgroundColor: Colors.red,)
// );
// print(
// nameRSController.value.text + phoneRSController.value.text + addressPICController.value.text + namePICController.value.text + phonePICController.value.text + emailPICController.value.text + passwordController.value.text
// );
// nameRSController.clear();
// phoneRSController.clear();
// addressPICController.clear();
// namePICController.clear();
// phonePICController.clear();
// emailPICController.clear();
// passwordController.clear();
// }
// },
child: const Text("REGISTER"),
SizedBox(
width: screenize.width * 0.02,
),
)
],
SizedBox(
height: 30,
width: screenize.width * 0.09,
child: ElevatedButton(
onPressed: () {},
// onPressed: () async {
// if (_formKey.currentState!.validate()){
// final response = await signUp(
// nameRSController.value.text,
// phoneRSController.value.text,
// addressRSController.value.text,
// namePICController.value.text,
// phonePICController.value.text,
// emailPICController.value.text,
// passwordController.value.text);
// ScaffoldMessenger.of(context).showSnackBar(
// response == true
// ? const SnackBar(
// content: Text("Registrasi berhasil ! cek email untuk validasi"),
// backgroundColor: Colors.green,)
// : const SnackBar(
// content: Text("Registrasi gagal"),
// backgroundColor: Colors.red,)
// );
// print(
// nameRSController.value.text + phoneRSController.value.text + addressPICController.value.text + namePICController.value.text + phonePICController.value.text + emailPICController.value.text + passwordController.value.text
// );
// nameRSController.clear();
// phoneRSController.clear();
// addressPICController.clear();
// namePICController.clear();
// phonePICController.clear();
// emailPICController.clear();
// passwordController.clear();
// }
// },
child: const Text("REGISTER"),
),
)
],
),
),
const Spacer(
flex: 4,
......
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