Ultima version para Google Play, cambios en politicas y colores. Nuevo aviso legal
This commit is contained in:
@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user