This commit is contained in:
Felipe
2023-09-01 09:11:25 -05:00
parent 9e408af634
commit 8d3c18a892
2 changed files with 42 additions and 74 deletions
+3 -9
View File
@@ -19,9 +19,7 @@ class SsupportStateScreen extends State<SupportScreen> {
final String body = '';
Future<void> _sendWhatsapp(String? number) async {
final _whatsappUrl =
'https://wa.me/$number?text=${Uri.parse('Hola! soy usuario de Prosapp y quisiera conocer mas sobre esta app')}';
final _whatsappUrl = 'https://api.whatsapp.com/send?phone=$number&text=Hola%21+soy+usuario+de+Prosapp+y+quisiera+conocer+mas+sobre+esta+app+%F0%9F%98%81';
if (!await launch(_whatsappUrl)) {
throw Exception('Could not launch $_whatsappUrl');
}
@@ -39,14 +37,10 @@ class SsupportStateScreen extends State<SupportScreen> {
}
void _sendEmailWeb(String recipients) async {
final email =
'mailto:$recipients?subject=${Uri.encodeComponent(recipients)}&body=${Uri.encodeComponent(body)}';
final email = 'mailto:$recipients?subject=${Uri.encodeComponent(recipients)}&body=${Uri.encodeComponent(body)}';
if (await canLaunch(email)) {
await launch(email);
} else {
// No se pudo abrir el cliente de correo electrónico
// Puedes mostrar un diálogo o realizar otra acción en este caso
}
} else {}
}
@override