update y componente drawer
This commit is contained in:
+10
-196
@@ -4,6 +4,7 @@ import 'package:firebase_storage/firebase_storage.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:prosappco/src/authentication/authentication_repository.dart';
|
||||
import 'package:prosappco/src/components/drawer_menu.dart';
|
||||
import 'package:prosappco/src/controllers/add_name_email_city.dart';
|
||||
|
||||
import '../components/photo_view.dart';
|
||||
@@ -69,201 +70,12 @@ class _WelcomeScreenState extends State<WelcomeScreen> {
|
||||
|
||||
return SafeArea(
|
||||
child: Scaffold(
|
||||
drawer: Drawer(
|
||||
child: ListView(
|
||||
padding: EdgeInsets.zero,
|
||||
children: [
|
||||
Column(
|
||||
children: [
|
||||
Column(
|
||||
children: [
|
||||
ListTile(
|
||||
onTap: () {
|
||||
Navigator.pushNamed(context, '/profile');
|
||||
},
|
||||
title: Text(user?.displayName ?? '',
|
||||
style: const TextStyle(fontWeight: FontWeight.bold)),
|
||||
subtitle: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
user?.phoneNumber ?? '',
|
||||
style: const TextStyle(fontSize: 12),
|
||||
),
|
||||
Text(
|
||||
city,
|
||||
style: const TextStyle(fontSize: 12),
|
||||
),
|
||||
],
|
||||
),
|
||||
leading: ReferencePhoto(
|
||||
ref: storage.ref().child(_photo),
|
||||
size: 50,
|
||||
),
|
||||
trailing: const Icon(Icons.keyboard_arrow_right,
|
||||
color: Colors.black),
|
||||
contentPadding: const EdgeInsets.symmetric(
|
||||
vertical: 20, horizontal: 16),
|
||||
),
|
||||
], // padding: const EdgeInsets.only(top: 20, bottom: 15),
|
||||
),
|
||||
const Divider(height: 0, color: Colors.grey),
|
||||
Column(
|
||||
children: [
|
||||
ListTile(
|
||||
onTap: () {},
|
||||
leading: const Icon(
|
||||
Icons.history,
|
||||
color: Colors.black,
|
||||
),
|
||||
title: const Text(
|
||||
'Mis servicios',
|
||||
style: TextStyle(fontSize: 15),
|
||||
),
|
||||
),
|
||||
ListTile(
|
||||
onTap: () {
|
||||
Navigator.pushNamed(context, '/profile');
|
||||
},
|
||||
leading: const Icon(
|
||||
Icons.person_outline,
|
||||
color: Colors.black,
|
||||
),
|
||||
title: const Text(
|
||||
'Mi perfil',
|
||||
style: TextStyle(fontSize: 15),
|
||||
),
|
||||
),
|
||||
ListTile(
|
||||
onTap: () {},
|
||||
leading: const Icon(
|
||||
Icons.construction_outlined,
|
||||
color: Colors.black,
|
||||
),
|
||||
title: const Text(
|
||||
'Configuración',
|
||||
style: TextStyle(fontSize: 15),
|
||||
),
|
||||
),
|
||||
ListTile(
|
||||
onTap: () {},
|
||||
leading: const Icon(
|
||||
Icons.question_mark_rounded,
|
||||
color: Colors.black,
|
||||
),
|
||||
title: const Text(
|
||||
'Soporte',
|
||||
style: TextStyle(fontSize: 15),
|
||||
),
|
||||
),
|
||||
ListTile(
|
||||
onTap: () {},
|
||||
leading: const Icon(
|
||||
Icons.messenger_outline,
|
||||
color: Colors.black,
|
||||
),
|
||||
title: const Text(
|
||||
'Mensajes',
|
||||
style: TextStyle(fontSize: 15),
|
||||
),
|
||||
),
|
||||
Builder(builder: (BuildContext context) {
|
||||
return ListTile(
|
||||
onTap: () {
|
||||
Scaffold.of(context).openEndDrawer();
|
||||
},
|
||||
trailing: const Icon(
|
||||
Icons.keyboard_arrow_right,
|
||||
color: Colors.white,
|
||||
),
|
||||
title: const Text(
|
||||
'Solicitar servicio',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 17,
|
||||
fontWeight: FontWeight.bold),
|
||||
),
|
||||
tileColor: const Color(0xFF2BA4EC),
|
||||
contentPadding: const EdgeInsets.symmetric(
|
||||
vertical: 5, horizontal: 16),
|
||||
);
|
||||
}),
|
||||
],
|
||||
),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
'Prosapp',
|
||||
style: TextStyle(fontSize: 10, color: Colors.grey[700]),
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 7, left: 3, right: 3),
|
||||
child: Text(
|
||||
'®',
|
||||
style: TextStyle(fontSize: 25, color: Colors.grey[700]),
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'todos los derechos reservados',
|
||||
style: TextStyle(fontSize: 10, color: Colors.grey[700]),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(top: 200),
|
||||
child: Row(
|
||||
children: [
|
||||
const SizedBox(width: 10),
|
||||
ElevatedButton(
|
||||
onPressed: () {
|
||||
AuthenticationRepository.instance.logout();
|
||||
},
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: Colors.white,
|
||||
shape: const CircleBorder(),
|
||||
elevation: 3,
|
||||
minimumSize: const Size(45, 45),
|
||||
),
|
||||
child: const Icon(
|
||||
Icons.logout_outlined,
|
||||
color: Colors.red,
|
||||
size: 35,
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 5),
|
||||
ElevatedButton(
|
||||
onPressed: () {
|
||||
if (state == 'pendiente') {
|
||||
Navigator.pushNamed(context, '/profesionalProfile');
|
||||
} else if (state == 'revision') {
|
||||
Navigator.pushNamed(context, '/profesionalRevision');
|
||||
}
|
||||
},
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: const Color(0xFF2BA4EC),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(50),
|
||||
),
|
||||
elevation: 0,
|
||||
minimumSize: const Size(200, 45),
|
||||
),
|
||||
child: const Text(
|
||||
'Modo profesional',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 15,
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
drawer: DrawerMenu(
|
||||
ref: storage.ref().child(_photo),
|
||||
userName: user?.displayName ?? '',
|
||||
userPhoneNumber: user?.phoneNumber ?? '',
|
||||
userCity: city,
|
||||
userState: state),
|
||||
resizeToAvoidBottomInset: false,
|
||||
backgroundColor: const Color(0xFFD6F4FF),
|
||||
body: Stack(
|
||||
@@ -340,7 +152,9 @@ class _WelcomeScreenState extends State<WelcomeScreen> {
|
||||
padding: const EdgeInsets.only(bottom: 40),
|
||||
child: Center(
|
||||
child: ElevatedButton(
|
||||
onPressed: () {},
|
||||
onPressed: () {
|
||||
print(ModalRoute.of(context)?.settings.name);
|
||||
},
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: const Color(0xFF2BA4EC),
|
||||
shape: RoundedRectangleBorder(
|
||||
|
||||
Reference in New Issue
Block a user