Commit 3f11b019 authored by Budi Prasetyo's avatar Budi Prasetyo

demo user + logout firebase

parent dfc1191d
import 'package:flutter/material.dart';
import 'package:medapp_eksad/firebase/firebase_auth_methods.dart';
import 'package:medapp_eksad/widget/button_appbar.dart';
import 'package:medapp_eksad/register.dart';
import 'package:provider/provider.dart';
import 'package:medapp_eksad/firebase/firebase_auth_methods.dart';
AppBar AppbarHomeLarge(Size screenSize, BuildContext context, Color home,
......
......@@ -6,6 +6,8 @@ import 'package:medapp_eksad/dashboard/admin/admin_setting.dart';
import 'package:medapp_eksad/dashboard/admin/admin_sosmed.dart';
import 'package:medapp_eksad/dashboard/admin/admin_userControl.dart';
import 'package:medapp_eksad/dashboard/admin/admin_whatsapp.dart';
import 'package:provider/provider.dart';
import 'package:medapp_eksad/firebase/firebase_auth_methods.dart';
class DashboardAdmin extends StatefulWidget {
const DashboardAdmin({Key? key}) : super(key: key);
......
......@@ -6,6 +6,8 @@ import '../appbar/appbar_home.dart';
import '../widget/drawer.dart';
import '../widget/responsive.dart';
import '../widget/whatsapp.dart';
import 'package:provider/provider.dart';
import 'package:medapp_eksad/firebase/firebase_auth_methods.dart';
void setPageTitle(String title, BuildContext context) {
SystemChrome.setApplicationSwitcherDescription(ApplicationSwitcherDescription(
......@@ -22,11 +24,17 @@ class DemoUser extends StatefulWidget {
}
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;
final user = context.read<FirebaseAuthMethods>().user;
final String mail = user.email!;
return Scaffold(
key: _scaffoldKey,
floatingActionButton: WAChat(),
......@@ -38,70 +46,76 @@ class _DemoUserState extends State<DemoUser> {
body: Container(
width: screenSize.width,
height: screenSize.height,
child: Row(
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Box(
wijet: ElevatedButton.icon(
onPressed: () {},
icon: Icon(
Icons.download,
size: 40,
Center(child: Text('Welcome, $mail',style: GoogleFonts.poppins(fontSize: 25),),),
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,
),
),
),
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.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.phone_android,
size: 40,
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,
),
),
),
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,
),
),
),
],
),
],
),
),
......
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