Completo y absoluto cambio de diseño
All checks were successful
Build & Deploy Farolero / Análisis de código (push) Successful in 23s
Build & Deploy Farolero / Build APK + AAB release (push) Successful in 1m53s

This commit is contained in:
2026-05-04 13:57:55 +02:00
parent ab0d4dc2ba
commit 841f94e543
18 changed files with 1012 additions and 319 deletions

View File

@@ -2,114 +2,212 @@ import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
class TemaApp {
static const colorFondo = Color(0xFF121212);
static const colorSuperficie = Color(0xFF1E1E1E);
static const colorTarjeta = Color(0xFF2A2A2A);
static const colorAcento = Color(0xFFE53935); // Rojo impostor
static const colorAcentoClaro = Color(0xFFFF6F61);
static const colorNaranja = Color(0xFFFF9800);
static const colorVerde = Color(0xFF4CAF50);
static const colorFondo = Color(0xFF05080D);
static const colorFondoAzul = Color(0xFF0A1520);
static const colorSuperficie = Color(0xFF0D151C);
static const colorTarjeta = Color(0xFF121B23);
static const colorBorde = Color(0xFF263947);
static const colorAcento = Color(0xFFC02824);
static const colorAcentoClaro = Color(0xFFF06A1A);
static const colorNaranja = Color(0xFFF49A13);
static const colorDorado = Color(0xFFFFCE55);
static const colorPurpura = Color(0xFF65306E);
static const colorAzul = Color(0xFF235BCE);
static const colorVerde = Color(0xFF61B944);
static const colorTexto = Color(0xFFFFFFFF);
static const colorTextoSecundario = Color(0xFFB0B0B0);
static const colorTextoSecundario = Color(0xFFC2B9AA);
static const gradientePrimario = LinearGradient(
colors: [Color(0xFFFFB11A), Color(0xFFE87A08)],
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
);
static const gradientePeligro = LinearGradient(
colors: [Color(0xFFC02824), Color(0xFF741112)],
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
);
static const gradienteFondo = LinearGradient(
colors: [Color(0xFF09131E), Color(0xFF030507)],
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
);
static ThemeData obtenerTema() {
final base = ThemeData.dark(useMaterial3: true);
final cuerpo = GoogleFonts.robotoCondensedTextTheme(base.textTheme);
return ThemeData(
useMaterial3: true,
brightness: Brightness.dark,
scaffoldBackgroundColor: colorFondo,
colorScheme: const ColorScheme.dark(
primary: colorAcento,
primary: colorNaranja,
secondary: colorNaranja,
surface: colorSuperficie,
error: colorAcento,
onPrimary: Colors.black,
onSurface: colorTexto,
),
textTheme: GoogleFonts.poppinsTextTheme(
const TextTheme(
textTheme: cuerpo.copyWith(
headlineLarge: TextStyle(
fontFamily: GoogleFonts.oswald().fontFamily,
color: colorTexto,
fontWeight: FontWeight.bold,
fontSize: 28,
fontSize: 30,
letterSpacing: 0,
),
headlineMedium: TextStyle(
fontFamily: GoogleFonts.oswald().fontFamily,
color: colorTexto,
fontWeight: FontWeight.bold,
fontSize: 22,
letterSpacing: 0,
),
titleLarge: TextStyle(
color: colorTexto,
fontWeight: FontWeight.w600,
fontFamily: GoogleFonts.oswald().fontFamily,
color: colorDorado,
fontWeight: FontWeight.w700,
fontSize: 18,
letterSpacing: 0,
),
titleMedium: TextStyle(
fontFamily: GoogleFonts.oswald().fontFamily,
color: colorTexto,
fontWeight: FontWeight.w500,
fontWeight: FontWeight.w600,
fontSize: 16,
letterSpacing: 0,
),
bodyLarge: TextStyle(color: colorTexto, fontSize: 16),
bodyMedium: TextStyle(color: colorTextoSecundario, fontSize: 14),
),
bodyLarge: const TextStyle(color: colorTexto, fontSize: 16),
bodyMedium: const TextStyle(color: colorTextoSecundario, fontSize: 14),
bodySmall: const TextStyle(color: colorTextoSecundario, fontSize: 12),
),
cardTheme: CardThemeData(
color: colorTarjeta,
elevation: 4,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16)),
color: colorTarjeta.withValues(alpha: 0.82),
elevation: 0,
margin: EdgeInsets.zero,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8),
side: const BorderSide(color: colorBorde),
),
),
elevatedButtonTheme: ElevatedButtonThemeData(
style: ElevatedButton.styleFrom(
backgroundColor: colorAcento,
foregroundColor: colorTexto,
padding: const EdgeInsets.symmetric(horizontal: 32, vertical: 16),
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)),
textStyle: GoogleFonts.poppins(
fontWeight: FontWeight.w600,
backgroundColor: colorNaranja,
foregroundColor: Colors.black,
disabledBackgroundColor: colorTarjeta,
disabledForegroundColor: colorTextoSecundario,
padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 15),
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)),
textStyle: GoogleFonts.oswald(
fontWeight: FontWeight.w700,
fontSize: 16,
letterSpacing: 0,
),
),
),
outlinedButtonTheme: OutlinedButtonThemeData(
style: OutlinedButton.styleFrom(
foregroundColor: colorTexto,
side: const BorderSide(color: colorAcento),
padding: const EdgeInsets.symmetric(horizontal: 32, vertical: 16),
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)),
side: const BorderSide(color: colorBorde),
padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 15),
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)),
textStyle: GoogleFonts.oswald(
fontWeight: FontWeight.w700,
fontSize: 16,
letterSpacing: 0,
),
),
),
inputDecorationTheme: InputDecorationTheme(
filled: true,
fillColor: colorTarjeta,
fillColor: const Color(0xFF0B1117),
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(12),
borderSide: BorderSide.none,
borderRadius: BorderRadius.circular(8),
borderSide: const BorderSide(color: colorBorde),
),
enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(8),
borderSide: const BorderSide(color: colorBorde),
),
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(12),
borderSide: const BorderSide(color: colorAcento),
borderRadius: BorderRadius.circular(8),
borderSide: const BorderSide(color: colorNaranja),
),
labelStyle: const TextStyle(color: colorTextoSecundario),
hintStyle: const TextStyle(color: colorTextoSecundario),
),
appBarTheme: AppBarTheme(
backgroundColor: colorFondo,
foregroundColor: colorTexto,
foregroundColor: colorNaranja,
centerTitle: true,
elevation: 0,
titleTextStyle: GoogleFonts.poppins(
color: colorTexto,
titleTextStyle: GoogleFonts.oswald(
color: colorDorado,
fontWeight: FontWeight.bold,
fontSize: 20,
letterSpacing: 0,
),
),
dividerTheme: const DividerThemeData(color: colorBorde, thickness: 1),
listTileTheme: const ListTileThemeData(
iconColor: colorNaranja,
textColor: colorTexto,
subtitleTextStyle: TextStyle(color: colorTextoSecundario),
),
segmentedButtonTheme: SegmentedButtonThemeData(
style: ButtonStyle(
backgroundColor: WidgetStateProperty.resolveWith((states) {
if (states.contains(WidgetState.selected)) return colorNaranja;
return colorSuperficie;
}),
foregroundColor: WidgetStateProperty.resolveWith((states) {
if (states.contains(WidgetState.selected)) return Colors.black;
return colorTexto;
}),
side: const WidgetStatePropertyAll(BorderSide(color: colorBorde)),
shape: WidgetStatePropertyAll(
RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)),
),
),
),
switchTheme: SwitchThemeData(
thumbColor: WidgetStateProperty.resolveWith((states) {
if (states.contains(WidgetState.selected)) return colorAcento;
if (states.contains(WidgetState.selected)) return colorNaranja;
return colorTextoSecundario;
}),
trackColor: WidgetStateProperty.resolveWith((states) {
if (states.contains(WidgetState.selected)) {
return colorAcento.withValues(alpha: 0.5);
return colorNaranja.withValues(alpha: 0.5);
}
return colorTarjeta;
}),
),
snackBarTheme: SnackBarThemeData(
backgroundColor: colorTarjeta,
contentTextStyle: cuerpo.bodyMedium?.copyWith(color: colorTexto),
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)),
),
);
}
static BoxDecoration decoracionPanel({
Color? color,
Color? borderColor,
}) {
return BoxDecoration(
color: color ?? colorTarjeta.withValues(alpha: 0.84),
borderRadius: BorderRadius.circular(8),
border: Border.all(color: borderColor ?? colorBorde),
boxShadow: [
BoxShadow(
color: Colors.black.withValues(alpha: 0.35),
blurRadius: 18,
offset: const Offset(0, 10),
),
],
);
}
}