aplicacion terminada, clase widget creada y separacion bloc

This commit is contained in:
2024-05-21 16:52:01 +02:00
parent df5651feac
commit 20a4cb7ab2
7 changed files with 248 additions and 275 deletions

View File

@ -5,8 +5,7 @@ import 'package:flutter_project/BloC/contenedores_event.dart';
import 'package:flutter_project/pages/noticias';
import 'package:flutter_project/pages/pregon';
import 'package:flutter_project/pages/embalses';
import 'package:flutter_project/widgets/background_widget.dart';
class MyHomePage extends StatelessWidget {
const MyHomePage({Key? key, required this.title}) : super(key: key);
@ -16,24 +15,16 @@ class MyHomePage extends StatelessWidget {
Widget build(BuildContext context) {
return Scaffold(
appBar: const CustomAppBar(),
body: Container(
decoration: const BoxDecoration(
image: DecorationImage(
image: AssetImage('assets/logo-fondo-verde.png'),
fit: BoxFit.cover,
),
),
body: BackgroundWidget(
child: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
InkWell(
onTap: () { Navigator.push(
context,
MaterialPageRoute(builder: (context) => const NoticiasPage()),
);},
context,
MaterialPageRoute(builder: (context) => const NoticiasPage()),
);},
child: SizedBox(
width: 300.0,
child: Padding(
@ -41,14 +32,14 @@ class MyHomePage extends StatelessWidget {
child: Container(
padding: const EdgeInsets.all(8.0),
decoration: BoxDecoration(
color: Color.fromARGB(255, 78, 169, 6),
color: const Color.fromARGB(255, 78, 169, 6),
borderRadius: BorderRadius.circular(7.0),
),
child: const Text(
'Noticias',
textAlign: TextAlign.center,
style: TextStyle(
color: Color.fromARGB(255, 255, 255, 255),
color: Colors.white,
fontSize: 32.0,
fontWeight: FontWeight.bold,
),
@ -71,7 +62,7 @@ class MyHomePage extends StatelessWidget {
child: Container(
padding: const EdgeInsets.all(8.0),
decoration: BoxDecoration(
color: Color.fromARGB(255, 78, 169, 6),
color: const Color.fromARGB(255, 78, 169, 6),
borderRadius: BorderRadius.circular(7.0),
),
child: const Text(
@ -101,7 +92,7 @@ class MyHomePage extends StatelessWidget {
child: Container(
padding: const EdgeInsets.all(8.0),
decoration: BoxDecoration(
color: Color.fromARGB(255, 78, 169, 6),
color: const Color.fromARGB(255, 78, 169, 6),
borderRadius: BorderRadius.circular(7.0),
),
child: const Text(
@ -128,7 +119,7 @@ class MyHomePage extends StatelessWidget {
child: Container(
padding: const EdgeInsets.all(8.0),
decoration: BoxDecoration(
color: Color.fromARGB(255, 78, 169, 6),
color: const Color.fromARGB(255, 78, 169, 6),
borderRadius: BorderRadius.circular(7.0),
),
child: const Text(