"cambios en iconos de la app android"
This commit is contained in:
@ -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> {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user