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
752658f0
Commit
752658f0
authored
Sep 09, 2022
by
Budi Prasetyo
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://103.44.149.204/qorridi/medapp_eksad
parents
f8e46b5a
5317d055
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
550 additions
and
2 deletions
+550
-2
main.dart
lib/main.dart
+3
-1
register_pic.dart
lib/register_pic.dart
+546
-0
home4.dart
lib/screen/home/home4.dart
+1
-1
No files found.
lib/main.dart
View file @
752658f0
...
...
@@ -4,6 +4,7 @@ import 'package:medapp_eksad/dashboard/admin/main_dashboard_admin.dart';
import
'package:medapp_eksad/homepage.dart'
;
import
'package:medapp_eksad/login.dart'
;
import
'package:medapp_eksad/register.dart'
;
import
'package:medapp_eksad/register_pic.dart'
;
import
'package:medapp_eksad/screen/contact_us/contact_us.dart'
;
import
'package:medapp_eksad/screen/solution.dart'
;
import
'package:medapp_eksad/screen_user/demo_user.dart'
;
...
...
@@ -30,7 +31,8 @@ class MyApp extends StatelessWidget {
'/register'
:
(
context
)
=>
const
Register
(),
'/dashboard'
:
(
context
)
=>
const
DashboardAdmin
(),
'/reset_password'
:
(
context
)
=>
const
ForgotPassword
(),
'/demo'
:
(
context
)
=>
const
DemoUser
()
'/demo'
:
(
context
)
=>
const
DemoUser
(),
'/register_pic'
:
(
context
)
=>
const
RegisterPic
(),
},
);
}
...
...
lib/register_pic.dart
0 → 100644
View file @
752658f0
import
'package:flutter/material.dart'
;
import
'package:medapp_eksad/api/user_api.dart'
;
class
RegisterPic
extends
StatefulWidget
{
const
RegisterPic
({
Key
?
key
})
:
super
(
key:
key
);
@override
State
<
RegisterPic
>
createState
()
=>
_RegisterPicState
();
}
class
_RegisterPicState
extends
State
<
RegisterPic
>
{
bool
_isObscure
=
true
;
final
_formKey
=
GlobalKey
<
FormState
>();
final
nameRSController
=
TextEditingController
();
final
phoneRSController
=
TextEditingController
();
final
addressRSController
=
TextEditingController
();
final
namePICController
=
TextEditingController
();
final
phonePICController
=
TextEditingController
();
final
addressPICController
=
TextEditingController
();
final
emailPICController
=
TextEditingController
();
final
passwordController
=
TextEditingController
();
@override
Widget
build
(
BuildContext
context
)
{
var
screenize
=
MediaQuery
.
of
(
context
).
size
;
return
Scaffold
(
body:
Container
(
height:
screenize
.
height
,
width:
screenize
.
width
,
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
),
child:
Stack
(
children:
[
Padding
(
padding:
EdgeInsets
.
symmetric
(
vertical:
screenize
.
height
*
0.15
),
// child: Container(
// decoration: BoxDecoration(
// color: const Color.fromARGB(255, 10, 116, 255),
// borderRadius: BorderRadius.circular(20),
// ),
// width: screenize.width * 0.36,
// height: screenize.height * 0.7,
// child: Image.asset(
// "assets/logo/logo-eksad.png",
// ),
// ),
child:
Image
.
asset
(
"assets/logo/logo-eksad.png"
,
),
),
Padding
(
padding:
EdgeInsets
.
only
(
left:
screenize
.
width
*
0.35
,
),
child:
Container
(
width:
screenize
.
width
*
0.30
,
height:
screenize
.
height
*
1
,
alignment:
Alignment
.
center
,
decoration:
BoxDecoration
(
color:
Colors
.
white
,
borderRadius:
BorderRadius
.
circular
(
20
),
border:
Border
.
all
(
width:
5
,
color:
const
Color
.
fromARGB
(
255
,
10
,
116
,
255
),
),
boxShadow:
[
BoxShadow
(
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
,
height:
screenize
.
height
*
1
,
child:
Column
(
crossAxisAlignment:
CrossAxisAlignment
.
start
,
mainAxisAlignment:
MainAxisAlignment
.
spaceEvenly
,
children:
[
const
Spacer
(),
Container
(
padding:
EdgeInsets
.
only
(
left:
screenize
.
width
*
0.05
),
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:
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
(
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 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
),
),
],
),
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
,
),
const
SizedBox
(
width:
10
,
),
const
Text
(
"Nama 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
,),
// ===============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:
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
,
),
const
SizedBox
(
width:
10
,
),
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
),
hintStyle:
const
TextStyle
(),
border:
OutlineInputBorder
(
borderRadius:
BorderRadius
.
circular
(
5.0
),
)
),
),
)
],
),
// ===============akhir email pic==========
const
SizedBox
(
height:
5
,),
// ===============password==========
Row
(
children:
[
Icon
(
Icons
.
vpn_key_off_sharp
,
color:
Colors
.
grey
[
500
],
size:
screenize
.
width
*
0.01
,
),
const
SizedBox
(
width:
10
,
),
const
Text
(
"Password"
,
style:
TextStyle
(
fontSize:
13
),
),
],
),
const
SizedBox
(
height:
5
,),
SizedBox
(
height:
60
,
width:
screenize
.
width
*
0.2
,
child:
TextFormField
(
controller:
passwordController
,
textAlign:
TextAlign
.
start
,
validator:
(
value
){
if
(
value
==
null
||
value
.
isEmpty
){
return
"Password tidak boleh kosong"
;
}
return
null
;
},
obscureText:
_isObscure
,
decoration:
InputDecoration
(
labelText:
"Password"
,
labelStyle:
TextStyle
(
fontSize:
13
),
suffixIcon:
IconButton
(
icon:
Icon
(
_isObscure
?
Icons
.
visibility
:
Icons
.
visibility_off
),
onPressed:
(){
setState
(()
{
_isObscure
=
!
_isObscure
;
});
},
),
hintStyle:
const
TextStyle
(),
border:
OutlineInputBorder
(
borderRadius:
BorderRadius
.
circular
(
5.0
)
),
),
),
),
// ===============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"
),
),
),
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
,
)
],
),
),
),
),
),
],
),
),
);
}
}
lib/screen/home/home4.dart
View file @
752658f0
...
...
@@ -125,7 +125,7 @@ class Home4 extends StatelessWidget {
width
:
180
,
child:
ElevatedButton
(
onPressed:
(){
Navigator
.
pushNamed
(
context
,
'/register'
);
Navigator
.
pushNamed
(
context
,
'/register
_pic
'
);
},
style:
ElevatedButton
.
styleFrom
(
primary:
Colors
.
blue
[
900
],
...
...
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