This commit is contained in:
Felipe
2023-07-31 12:49:47 -05:00
parent 809873894c
commit b0d88fc68a
4 changed files with 26 additions and 34 deletions
+22
View File
@@ -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<DrawerMenu> {
}
}
Future<void> _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<DrawerMenu> {
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(
+2 -2
View File
@@ -434,11 +434,11 @@ class _ProfileWebScreenState extends State<ProfileWebScreen> {
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 {
+2 -1
View File
@@ -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<ServiceScreen> {
context,
CupertinoPageRoute(
builder: (BuildContext context) {
return const ProfileScreen();
return const ProfileWebScreen();
},
),
);
-31
View File
@@ -27,16 +27,6 @@ class SsupportStateScreen extends State<SupportScreen> {
}
}
Future<void> _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<void> _sendEmail(String recipients) async {
final Email email = Email(
body: body,
@@ -166,27 +156,6 @@ class SsupportStateScreen extends State<SupportScreen> {
],
),
),
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,
),
),
),
)
],
),
);