diff --git a/lib/src/components/drawer_menu.dart b/lib/src/components/drawer_menu.dart index cc2c071..4fb3398 100644 --- a/lib/src/components/drawer_menu.dart +++ b/lib/src/components/drawer_menu.dart @@ -14,6 +14,7 @@ import 'package:prosappco/src/screens/profile.dart'; import 'package:prosappco/src/screens/profile_web.dart'; import 'package:prosappco/src/screens/reputation.dart'; import 'package:prosappco/src/screens/support.dart'; +import 'package:url_launcher/url_launcher.dart'; import 'package:get/get.dart'; class DrawerMenu extends StatefulWidget { @@ -43,6 +44,16 @@ class _DrawerMenuState extends State { } } + Future _irSugerencias() async { + const url = + 'https://admin.prosapp.co/sugerencias '; // Aquí debes poner la URL a la que quieres dirigirte + if (await canLaunch(url)) { + await launch(url); + } else { + throw 'No se pudo abrir la URL $url'; + } + } + @override Widget build(BuildContext context) { final User? currentUser = FirebaseAuth.instance.currentUser; @@ -212,6 +223,17 @@ class _DrawerMenuState extends State { style: TextStyle(fontSize: 15), ), ), + ListTile( + onTap: _irSugerencias, + leading: const Icon( + Icons.campaign_outlined, + color: Colors.black, + ), + title: const Text( + 'Sugerencias', + style: TextStyle(fontSize: 15), + ), + ), ListTile( onTap: () { Navigator.push( diff --git a/lib/src/screens/profile_web.dart b/lib/src/screens/profile_web.dart index 51589d4..c195420 100644 --- a/lib/src/screens/profile_web.dart +++ b/lib/src/screens/profile_web.dart @@ -434,11 +434,11 @@ class _ProfileWebScreenState extends State { builder: (context, snapshot) { if (snapshot.connectionState == ConnectionState.waiting) { - return Center( + return const Center( child: CircularProgressIndicator(), ); } else if (snapshot.hasError) { - return Center( + return const Center( child: Text('Error al obtener las ciudades'), ); } else { diff --git a/lib/src/screens/service.dart b/lib/src/screens/service.dart index 83f6f88..7bf4f8c 100644 --- a/lib/src/screens/service.dart +++ b/lib/src/screens/service.dart @@ -17,6 +17,7 @@ import 'package:prosappco/src/models/user_model.dart'; import 'package:prosappco/src/screens/professional.dart'; import 'package:intl/intl.dart'; import 'package:prosappco/src/screens/profile.dart'; +import 'package:prosappco/src/screens/profile_web.dart'; import 'package:prosappco/src/screens/service_after.dart'; import 'package:prosappco/src/screens/service_type.dart'; import 'package:prosappco/src/screens/ubicacion.dart'; @@ -452,7 +453,7 @@ class _ServiceScreenState extends State { context, CupertinoPageRoute( builder: (BuildContext context) { - return const ProfileScreen(); + return const ProfileWebScreen(); }, ), ); diff --git a/lib/src/screens/support.dart b/lib/src/screens/support.dart index 330242b..cadd749 100644 --- a/lib/src/screens/support.dart +++ b/lib/src/screens/support.dart @@ -27,16 +27,6 @@ class SsupportStateScreen extends State { } } - Future _irSugerencias() async { - const url = - 'https://admin.prosapp.co/sugerencias '; // Aquí debes poner la URL a la que quieres dirigirte - if (await canLaunch(url)) { - await launch(url); - } else { - throw 'No se pudo abrir la URL $url'; - } - } - Future _sendEmail(String recipients) async { final Email email = Email( body: body, @@ -166,27 +156,6 @@ class SsupportStateScreen extends State { ], ), ), - Padding( - padding: const EdgeInsets.only(bottom: 15), - child: ElevatedButton( - onPressed: _irSugerencias, - style: ElevatedButton.styleFrom( - padding: - const EdgeInsets.symmetric(vertical: 15, horizontal: 15), - backgroundColor: - const Color(0xFF2BA4EC), // Color de fondo del botón - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(15), // Bordes redondeados - ), - ), - child: const Text( - 'Sugerencias', - style: TextStyle( - fontSize: 16, - ), - ), - ), - ) ], ), );