"Responsive cuando se hace zoom en el texto y actualizacion del telefono"

This commit is contained in:
2025-05-22 16:30:45 +02:00
parent d8f7bd11d8
commit 59b9e372b7
254 changed files with 38459 additions and 36 deletions

View File

@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:url_launcher/url_launcher.dart';
import 'package:crcivan/pages/utils.dart'; // Importar la función global
import 'dart:math' show min;
class CustomBottomBar extends StatelessWidget {
const CustomBottomBar({Key? key}) : super(key: key);
@ -27,7 +28,7 @@ class CustomBottomBar extends StatelessWidget {
color: Colors.blue,
iconSize: getResponsiveFontSize(context, 24.0), // Ajustar el tamaño del icono
onPressed: () {
_launchURL('tel:+348766361379');
_launchURL('tel:+34876636138');
},
),
Expanded(
@ -35,7 +36,7 @@ class CustomBottomBar extends StatelessWidget {
'Avenida Maella, 35 50700 Caspe (Zaragoza)',
textAlign: TextAlign.center,
style: TextStyle(
fontSize: getResponsiveFontSize(context, 14.0),
fontSize: min(getResponsiveFontSize(context, 10.0), 10.0),
fontWeight: FontWeight.bold,
),
),

View File

@ -9,7 +9,8 @@ import 'package:crcivan/pages/embalses';
import 'package:crcivan/pages/secciones';
import 'package:crcivan/widgets/background_widget.dart';
import 'package:url_launcher/url_launcher.dart';
import 'package:crcivan/pages/utils.dart'; // Importar la función global
import 'package:crcivan/pages/utils.dart';
import 'dart:math' show min; // Añadir esta importación
class MyHomePage extends StatefulWidget {
const MyHomePage({super.key, required this.title});
@ -62,8 +63,7 @@ class _MyHomePageState extends State<MyHomePage> {
"Todos los datos presentados en esta aplicación provienen de fuentes externas y no han sido alterados ni modificados. "
"CR-Civán no asume ninguna responsabilidad sobre la veracidad o exactitud de los mismos.",
style: TextStyle(
fontSize: getResponsiveFontSize(
context, 16)), // Ajustar el tamaño del texto aquí
fontSize: min(getResponsiveFontSize(context, 16), 18)), // Limitar a 18px
),
),
actions: [
@ -75,7 +75,12 @@ class _MyHomePageState extends State<MyHomePage> {
onPressed: () {
Navigator.of(context).pop();
},
child: Text("LO ENTIENDO"),
child: Text(
"LO ENTIENDO",
style: TextStyle(
fontSize: min(getResponsiveFontSize(context, 16), 18), // Limitar a 18px
),
),
),
],
);
@ -125,7 +130,7 @@ class _MyHomePageState extends State<MyHomePage> {
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.white,
fontSize: getResponsiveFontSize(context, 32.0),
fontSize: min(getResponsiveFontSize(context, 26.0), 26.0),
fontWeight: FontWeight.bold,
),
),
@ -155,7 +160,7 @@ class _MyHomePageState extends State<MyHomePage> {
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.white,
fontSize: getResponsiveFontSize(context, 32.0),
fontSize: min(getResponsiveFontSize(context, 26.0), 26.0),
fontWeight: FontWeight.bold,
),
),
@ -186,7 +191,7 @@ class _MyHomePageState extends State<MyHomePage> {
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.white,
fontSize: getResponsiveFontSize(context, 32.0),
fontSize: min(getResponsiveFontSize(context, 26.0), 26.0),
fontWeight: FontWeight.bold,
),
),
@ -217,7 +222,7 @@ class _MyHomePageState extends State<MyHomePage> {
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.white,
fontSize: getResponsiveFontSize(context, 32.0),
fontSize: min(getResponsiveFontSize(context, 26.0), 26.0),
fontWeight: FontWeight.bold,
),
),
@ -244,7 +249,7 @@ class _MyHomePageState extends State<MyHomePage> {
textAlign: TextAlign.center,
style: TextStyle(
color: Color.fromARGB(255, 78, 169, 6),
fontSize: getResponsiveFontSize(context, 32.0),
fontSize: min(getResponsiveFontSize(context, 26.0), 26.0),
fontWeight: FontWeight.bold,
),
),
@ -253,26 +258,30 @@ class _MyHomePageState extends State<MyHomePage> {
),
),
SizedBox(height: 20),
InkWell(
onTap: () {
launchPrivacyPolicyURL();
},
child: Text(
'Lee nuestras políticas de privacidad',
style: TextStyle(
color: Colors.blue,
decoration: TextDecoration.underline,
fontSize: getResponsiveFontSize(context, 16.0),
Center(
child: InkWell(
onTap: () {
launchPrivacyPolicyURL();
},
child: Text(
'Lee nuestras políticas de privacidad',
style: TextStyle(
color: Colors.blue,
decoration: TextDecoration.underline,
fontSize: min(getResponsiveFontSize(context, 14.0), 14.0),
),
),
),
),
SizedBox(height: 10),
ElevatedButton(
onPressed: mostrarAvisoLegal,
child: Text(
'Aviso Legal',
style: TextStyle(
fontSize: getResponsiveFontSize(context, 16.0),
Center( // Añadir este widget
child: ElevatedButton(
onPressed: mostrarAvisoLegal,
child: Text(
'Aviso Legal',
style: TextStyle(
fontSize: min(getResponsiveFontSize(context, 14.0), 14.0),
),
),
),
),

View File

@ -8,6 +8,7 @@ import 'package:crcivan/bars/app_bar';
import 'package:crcivan/bars/bottom_bar';
import 'package:crcivan/widgets/background_widget.dart';
import 'package:crcivan/pages/utils.dart';
import 'dart:math' show min;
class SeccionesPage extends StatefulWidget {
const SeccionesPage({Key? key}) : super(key: key);
@ -73,21 +74,19 @@ class _SeccionesPageState extends State<SeccionesPage> {
children: [
Padding(
padding: const EdgeInsets.all(8.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.start,
child: Wrap(
children: [
const Text(
'ÚLTIMO RIEGO',
Text(
'ÚLTIMO RIEGO ',
style: TextStyle(
fontSize: 20.0,
fontSize: min(getResponsiveFontSize(context, 20.0), 24.0),
fontWeight: FontWeight.bold,
),
),
const SizedBox(width: 8.0),
Text(
seccion['section'],
style: TextStyle(
fontSize: getResponsiveFontSize(context, 20.0),
fontSize: min(getResponsiveFontSize(context, 20.0), 24.0),
fontWeight: FontWeight.bold,
),
),