Commit 1f4c8b5c authored by Budi Prasetyo's avatar Budi Prasetyo

demo user

parent c108db3f
......@@ -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),
),
......
......@@ -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()
},
);
}
......
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,
);
}
}
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