"cambios en iconos de la app android"

This commit is contained in:
2024-10-09 16:41:16 +02:00
parent be701d6e50
commit a7a97bfeae
39 changed files with 133 additions and 136 deletions

View File

@ -16,7 +16,7 @@ class _NoticiasPageState extends State<NoticiasPage> {
List<Map<String, String>> noticias = [];
bool _isLoading = true;
static const String url = 'http://www.crcivan.com/escaparate/noticias.cgi?idpadre=92776&idempresa=31637';
static const String url = 'https://crcivan.asociacionador.es/noticias.html';
@override
void initState() {
@ -39,12 +39,18 @@ class _NoticiasPageState extends State<NoticiasPage> {
var tituloElement = element.querySelector('b > a');
if (tituloElement != null) {
var titulo = tituloElement.text.trim();
var href = tituloElement.attributes['href'];
var contenido = '';
var fontElements = element.querySelectorAll('font');
for (var font in fontElements) {
contenido += '${font.text.trim()}\n';
}
noticiasTemp.add({'titulo': titulo, 'contenido': contenido.trim()});
noticiasTemp.add({
'titulo': titulo,
'contenido': contenido.trim(),
'href': href ?? ''
});
}
}
@ -75,6 +81,7 @@ class _NoticiasPageState extends State<NoticiasPage> {
itemBuilder: (context, index) {
var titulo = noticias[index]['titulo'];
var contenido = noticias[index]['contenido'];
var href = noticias[index]['href'];
return Container(
color: Colors.white.withOpacity(0.5), // Fondo blanco con 50% de opacidad
@ -93,6 +100,17 @@ class _NoticiasPageState extends State<NoticiasPage> {
style: TextStyle(fontSize: 16.0), // Mantener el texto del contenido en estilo regular
),
),
Padding(
padding: const EdgeInsets.all(8.0),
child: Text(
href ?? 'Enlace no disponible',
style: TextStyle(
fontSize: 14.0,
color: Colors.blue,
decoration: TextDecoration.underline,
),
),
),
],
),
);
@ -103,4 +121,3 @@ class _NoticiasPageState extends State<NoticiasPage> {
);
}
}

View File

@ -7,7 +7,6 @@ import 'package:flutter_project/bars/bottom_bar';
import 'package:flutter_project/widgets/background_widget.dart';
class Pregon extends StatefulWidget {
const Pregon({Key? key}) : super(key: key);
@ -25,7 +24,7 @@ class _PregonState extends State<Pregon> {
}
Future<void> obtenerDatos() async {
final response = await http.get(Uri.parse('http://www.crcivan.com/escaparate/noticias.cgi?idnoticias=192680'));
final response = await http.get(Uri.parse('https://crcivan.asociacionador.es/pregon.html'));
if (response.statusCode == 200) {
final document = htmlParser.parse(response.body);