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
1f4c8b5c
Commit
1f4c8b5c
authored
Sep 08, 2022
by
Budi Prasetyo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
demo user
parent
c108db3f
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
155 additions
and
14 deletions
+155
-14
appbar_home.dart
lib/appbar/appbar_home.dart
+6
-14
main.dart
lib/main.dart
+2
-0
demo_user.dart
lib/screen_user/demo_user.dart
+147
-0
No files found.
lib/appbar/appbar_home.dart
View file @
1f4c8b5c
...
...
@@ -89,7 +89,7 @@ AppBar AppbarHomeLarge(Size screenSize, BuildContext context, Color home,
}
AppBar
AppbarHomeLargeUser
(
Size
screenSize
,
BuildContext
context
,
Color
home
,
Color
aboutUs
,
Color
ourServices
,
Color
career
,
Color
contactUs
)
{
Color
aboutUs
,
Color
ourServices
,
Color
career
,
Color
contactUs
,
Color
demo
)
{
return
AppBar
(
backgroundColor:
Colors
.
white
,
toolbarHeight:
80
,
...
...
@@ -135,24 +135,16 @@ AppBar AppbarHomeLargeUser(Size screenSize, BuildContext context, Color home,
ButtonAppbar_baru
(
arah:
'/contact'
,
menu:
'Contact Us'
,
warna:
contactUs
),
const
Spacer
(
flex:
2
,
),
TextButton
(
onPressed:
()
{
Navigator
.
pushNamed
(
context
,
'/login'
);
},
child:
const
Text
(
'Login'
,
style:
TextStyle
(
fontSize:
19
,
fontWeight:
FontWeight
.
w500
,
color:
Colors
.
black
),
),
flex:
1
,
),
ButtonAppbar_baru
(
arah:
'/demo'
,
menu:
'Demo'
,
warna:
demo
),
Spacer
(
flex:
2
,),
Container
(
width:
screenSize
.
width
*
0.006
,
),
ElevatedButton
(
onPressed:
()
{
Navigator
.
pushNamed
(
context
,
'/
register
'
);
Navigator
.
pushNamed
(
context
,
'/'
);
},
style:
ElevatedButton
.
styleFrom
(
primary:
const
Color
(
0xff1e5ea8
),
...
...
@@ -160,7 +152,7 @@ AppBar AppbarHomeLargeUser(Size screenSize, BuildContext context, Color home,
onPrimary:
Colors
.
red
,
),
child:
const
Text
(
'
Register
'
,
'
Logout
'
,
style:
TextStyle
(
color:
Colors
.
white
,
fontSize:
19
,
fontWeight:
FontWeight
.
w500
),
),
...
...
lib/main.dart
View file @
1f4c8b5c
...
...
@@ -6,6 +6,7 @@ import 'package:medapp_eksad/login.dart';
import
'package:medapp_eksad/register.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'
;
void
main
(
)
{
runApp
(
const
MyApp
());
...
...
@@ -29,6 +30,7 @@ class MyApp extends StatelessWidget {
'/register'
:
(
context
)
=>
const
Register
(),
'/dashboard'
:
(
context
)
=>
const
DashboardAdmin
(),
'/reset_password'
:
(
context
)
=>
const
ForgotPassword
(),
'/demo'
:
(
context
)
=>
const
DemoUser
()
},
);
}
...
...
lib/screen_user/demo_user.dart
0 → 100644
View file @
1f4c8b5c
import
'package:flutter/material.dart'
;
import
'package:flutter/services.dart'
;
import
'package:google_fonts/google_fonts.dart'
;
import
'../appbar/appbar_home.dart'
;
import
'../widget/drawer.dart'
;
import
'../widget/responsive.dart'
;
import
'../widget/whatsapp.dart'
;
void
setPageTitle
(
String
title
,
BuildContext
context
)
{
SystemChrome
.
setApplicationSwitcherDescription
(
ApplicationSwitcherDescription
(
label:
title
,
primaryColor:
Theme
.
of
(
context
).
primaryColor
.
value
,
// This line is required
));
}
class
DemoUser
extends
StatefulWidget
{
const
DemoUser
({
Key
?
key
})
:
super
(
key:
key
);
@override
State
<
DemoUser
>
createState
()
=>
_DemoUserState
();
}
class
_DemoUserState
extends
State
<
DemoUser
>
{
final
GlobalKey
<
ScaffoldState
>
_scaffoldKey
=
new
GlobalKey
<
ScaffoldState
>();
@override
Widget
build
(
BuildContext
context
)
{
setPageTitle
(
'Free Demo Medapp'
,
context
);
var
screenSize
=
MediaQuery
.
of
(
context
).
size
;
return
Scaffold
(
key:
_scaffoldKey
,
floatingActionButton:
WAChat
(),
appBar:
ResponsiveWidget
.
isSmallScreen
(
context
)
?
AppBarKecil
()
:
AppbarHomeLargeUser
(
screenSize
,
context
,
Colors
.
black
,
Colors
.
black
,
Colors
.
black
,
Colors
.
black
,
Colors
.
black
,
Colors
.
blue
),
drawer:
const
DrawerMedApp
(),
body:
Container
(
width:
screenSize
.
width
,
height:
screenSize
.
height
,
child:
Row
(
mainAxisAlignment:
MainAxisAlignment
.
spaceEvenly
,
children:
[
Box
(
wijet:
ElevatedButton
.
icon
(
onPressed:
()
{},
icon:
Icon
(
Icons
.
download
,
size:
40
,
),
label:
Text
(
'Download APK'
,
style:
GoogleFonts
.
poppins
(
fontSize:
20
,
fontWeight:
FontWeight
.
w600
),
textAlign:
TextAlign
.
center
,
),
),
),
Box
(
wijet:
ElevatedButton
.
icon
(
onPressed:
()
{},
icon:
Icon
(
Icons
.
tv
,
size:
40
,
),
label:
Text
(
'TV Display'
,
style:
GoogleFonts
.
poppins
(
fontSize:
20
,
fontWeight:
FontWeight
.
w600
),
textAlign:
TextAlign
.
center
,
),
),
),
Box
(
wijet:
ElevatedButton
.
icon
(
onPressed:
()
{},
icon:
Icon
(
Icons
.
phone_android
,
size:
40
,
),
label:
Text
(
'Kiosk'
,
style:
GoogleFonts
.
poppins
(
fontSize:
20
,
fontWeight:
FontWeight
.
w600
),
textAlign:
TextAlign
.
center
,
),
),
),
Box
(
wijet:
ElevatedButton
.
icon
(
onPressed:
()
{},
icon:
Icon
(
Icons
.
browser_updated
,
size:
40
,
),
label:
Text
(
'Web Admin'
,
style:
GoogleFonts
.
poppins
(
fontSize:
20
,
fontWeight:
FontWeight
.
w600
),
textAlign:
TextAlign
.
center
,
),
),
),
],
),
),
);
}
AppBar
AppBarKecil
()
{
return
AppBar
(
leading:
IconButton
(
onPressed:
()
=>
_scaffoldKey
.
currentState
!.
openDrawer
(),
icon:
const
Icon
(
Icons
.
list_outlined
,
size:
30
,
color:
Colors
.
black
,
),
),
backgroundColor:
Colors
.
white
,
centerTitle:
true
,
title:
SizedBox
(
height:
50
,
width:
150
,
child:
Image
.
asset
(
"assets/logo/medapp-logo.png"
),
),
// ),
);
}
}
class
Box
extends
StatelessWidget
{
const
Box
({
Key
?
key
,
required
this
.
wijet
})
:
super
(
key:
key
);
final
Widget
wijet
;
@override
Widget
build
(
BuildContext
context
)
{
return
Container
(
width:
MediaQuery
.
of
(
context
).
size
.
width
*
0.15
,
height:
MediaQuery
.
of
(
context
).
size
.
height
*
0.3
,
color:
Colors
.
grey
,
child:
wijet
,
);
}
}
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