Ultima version para Google Play, cambios en politicas y colores. Nuevo aviso legal

This commit is contained in:
2025-03-12 09:54:39 +01:00
parent 0d61ca6d01
commit 6c062682f6
13 changed files with 624 additions and 125 deletions

View File

@ -1,14 +1,26 @@
import 'package:flutter/material.dart';
import 'package:crcivan/pages/utils.dart'; // Importar la función global
class CustomAppBar extends StatelessWidget implements PreferredSizeWidget {
const CustomAppBar({Key? key}) : super(key: key);
double _getIconSize(BuildContext context) {
double screenWidth = MediaQuery.of(context).size.width;
return screenWidth > 600 ? 40.0 : 32.0;
}
@override
Widget build(BuildContext context) {
double iconSize = _getIconSize(context);
return AppBar(
title: const Text(''),
centerTitle: true,
backgroundColor: Color.fromARGB(255, 78, 169, 6),
backgroundColor: const Color.fromARGB(255, 78, 169, 6),
iconTheme: IconThemeData(
color: Colors.white, // Cambia este color al que desees
size: iconSize, // Ajustar el tamaño del icono
),
flexibleSpace: Container(
padding: const EdgeInsets.all(8.0),
child: Center(
@ -16,8 +28,8 @@ class CustomAppBar extends StatelessWidget implements PreferredSizeWidget {
padding: const EdgeInsets.only(top: 10.0),
child: Image.asset(
'assets/logo-civan.png',
height: 200,
width: 200,
height: getResponsiveFontSize(context, 200.0), // Ajustar la altura de la imagen
width: getResponsiveFontSize(context, 200.0), // Ajustar el ancho de la imagen
),
),
),
@ -26,5 +38,5 @@ class CustomAppBar extends StatelessWidget implements PreferredSizeWidget {
}
@override
Size get preferredSize => const Size.fromHeight(kToolbarHeight);
Size get preferredSize => const Size.fromHeight(kToolbarHeight); // Tamaño fijo para el AppBar
}

View File

@ -1,43 +1,57 @@
import 'package:flutter/material.dart';
import 'package:url_launcher/url_launcher.dart';
import 'package:url_launcher/url_launcher.dart';
import 'package:crcivan/pages/utils.dart'; // Importar la función global
class CustomBottomBar extends StatelessWidget {
const CustomBottomBar({Key? key}) : super(key: key);
Future<void> _launchURL(String url) async {
try {
await launch(url);
} catch (e) {
// Captura de la excepción
print('An error occurred: $e');
try {
await launch(url);
} catch (e) {
// Captura de la excepción
print('An error occurred: $e');
}
}
}
@override
Widget build(BuildContext context) {
return BottomNavigationBar(
items: const [
BottomNavigationBarItem(
icon: Icon(Icons.call),
label: 'Llamar',
return BottomAppBar(
child: Container(
height: getResponsiveFontSize(context, 80.0), // Ajustar la altura del BottomAppBar
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: [
IconButton(
icon: const Icon(Icons.call),
color: Colors.blue,
iconSize: getResponsiveFontSize(context, 24.0), // Ajustar el tamaño del icono
onPressed: () {
_launchURL('tel:+348766361379');
},
),
Expanded(
child: Text(
'Avenida Maella, 35 50700 Caspe (Zaragoza)',
textAlign: TextAlign.center,
style: TextStyle(
fontSize: getResponsiveFontSize(context, 14.0),
fontWeight: FontWeight.bold,
),
),
),
IconButton(
icon: const Icon(Icons.email),
color: Colors.blue,
iconSize: getResponsiveFontSize(context, 24.0), // Ajustar el tamaño del icono
onPressed: () {
_launchURL('mailto:civan@crcivan.com');
},
),
],
),
BottomNavigationBarItem(
icon: Icon(Icons.email),
label: 'Correo',
),
],
selectedItemColor: Colors.blue,
unselectedItemColor: Colors.blue,
backgroundColor: const Color.fromARGB(255, 255, 255, 255),
currentIndex: 0,
onTap: (int index) {
if (index == 0) {
_launchURL('tel:+348766361379');
} else if (index == 1) {
_launchURL('mailto:civan@crcivan.com');
}
},
),
);
}
}