update
This commit is contained in:
@@ -14,6 +14,7 @@ import 'package:prosappco/src/screens/profile.dart';
|
|||||||
import 'package:prosappco/src/screens/profile_web.dart';
|
import 'package:prosappco/src/screens/profile_web.dart';
|
||||||
import 'package:prosappco/src/screens/reputation.dart';
|
import 'package:prosappco/src/screens/reputation.dart';
|
||||||
import 'package:prosappco/src/screens/support.dart';
|
import 'package:prosappco/src/screens/support.dart';
|
||||||
|
import 'package:url_launcher/url_launcher.dart';
|
||||||
import 'package:get/get.dart';
|
import 'package:get/get.dart';
|
||||||
|
|
||||||
class DrawerMenu extends StatefulWidget {
|
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
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final User? currentUser = FirebaseAuth.instance.currentUser;
|
final User? currentUser = FirebaseAuth.instance.currentUser;
|
||||||
@@ -212,6 +223,17 @@ class _DrawerMenuState extends State<DrawerMenu> {
|
|||||||
style: TextStyle(fontSize: 15),
|
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(
|
ListTile(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Navigator.push(
|
Navigator.push(
|
||||||
|
|||||||
@@ -434,11 +434,11 @@ class _ProfileWebScreenState extends State<ProfileWebScreen> {
|
|||||||
builder: (context, snapshot) {
|
builder: (context, snapshot) {
|
||||||
if (snapshot.connectionState ==
|
if (snapshot.connectionState ==
|
||||||
ConnectionState.waiting) {
|
ConnectionState.waiting) {
|
||||||
return Center(
|
return const Center(
|
||||||
child: CircularProgressIndicator(),
|
child: CircularProgressIndicator(),
|
||||||
);
|
);
|
||||||
} else if (snapshot.hasError) {
|
} else if (snapshot.hasError) {
|
||||||
return Center(
|
return const Center(
|
||||||
child: Text('Error al obtener las ciudades'),
|
child: Text('Error al obtener las ciudades'),
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ import 'package:prosappco/src/models/user_model.dart';
|
|||||||
import 'package:prosappco/src/screens/professional.dart';
|
import 'package:prosappco/src/screens/professional.dart';
|
||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
import 'package:prosappco/src/screens/profile.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_after.dart';
|
||||||
import 'package:prosappco/src/screens/service_type.dart';
|
import 'package:prosappco/src/screens/service_type.dart';
|
||||||
import 'package:prosappco/src/screens/ubicacion.dart';
|
import 'package:prosappco/src/screens/ubicacion.dart';
|
||||||
@@ -452,7 +453,7 @@ class _ServiceScreenState extends State<ServiceScreen> {
|
|||||||
context,
|
context,
|
||||||
CupertinoPageRoute(
|
CupertinoPageRoute(
|
||||||
builder: (BuildContext context) {
|
builder: (BuildContext context) {
|
||||||
return const ProfileScreen();
|
return const ProfileWebScreen();
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -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 {
|
Future<void> _sendEmail(String recipients) async {
|
||||||
final Email email = Email(
|
final Email email = Email(
|
||||||
body: body,
|
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,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
)
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user