Cambio interfaz home (prueba), error en enlace Tiempo y noticias faltan mejoras

This commit is contained in:
2024-05-16 12:28:25 +02:00
parent eec626ac3a
commit 0c1ef39a32
7 changed files with 102 additions and 58 deletions

View File

@ -37,12 +37,16 @@ Future<List<String>> obtenerDatos(String url) async {
}
Future<void> launchAemetURL() async {
const urlString = 'https://www.aemet.es/es/eltiempo/prediccion/municipios/caspe-id50074';
final url = Uri.parse(urlString);
const urlString = 'https://www.aemet.es/es/eltiempo/prediccion/municipios/caspe-id50074';
final url = Uri.parse(urlString);
if (await canLaunchUrl(url)) {
await launchUrl(url);
} else {
throw 'Could not launch $urlString';
}
try {
if (await canLaunch(urlString)) {
await launch(urlString);
} else {
throw 'Could not launch $urlString';
}
} catch (e) {
throw Exception('Error al lanzar la URL de Aemet: $e');
}
}