feat:implementacion grafica
This commit is contained in:
110
lib/core/theme/app_theme.dart
Normal file
110
lib/core/theme/app_theme.dart
Normal file
@@ -0,0 +1,110 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
/// Paleta y tema central de WasteNotify.
|
||||
/// Inspirado en materiales naturales: verde bosque + tierra + blanco hueso.
|
||||
/// Transmite confianza institucional y respeto ambiental.
|
||||
abstract final class AppTheme {
|
||||
// --- Paleta de color ---
|
||||
static const Color forestGreen = Color(0xFF1B5E20);
|
||||
static const Color leafGreen = Color(0xFF2E7D32);
|
||||
static const Color mintGreen = Color(0xFF43A047);
|
||||
static const Color lightMint = Color(0xFFE8F5E9);
|
||||
static const Color earthBrown = Color(0xFF4E342E);
|
||||
static const Color sandBeige = Color(0xFFFFF8E1);
|
||||
static const Color warmWhite = Color(0xFFFAFAF7);
|
||||
static const Color charcoal = Color(0xFF212121);
|
||||
static const Color midGray = Color(0xFF757575);
|
||||
static const Color lightGray = Color(0xFFEEEEEE);
|
||||
static const Color alertAmber = Color(0xFFF57C00);
|
||||
static const Color errorRed = Color(0xFFC62828);
|
||||
|
||||
static ThemeData get light {
|
||||
const colorScheme = ColorScheme(
|
||||
brightness: Brightness.light,
|
||||
primary: leafGreen,
|
||||
onPrimary: Colors.white,
|
||||
primaryContainer: lightMint,
|
||||
onPrimaryContainer: forestGreen,
|
||||
secondary: earthBrown,
|
||||
onSecondary: Colors.white,
|
||||
secondaryContainer: sandBeige,
|
||||
onSecondaryContainer: earthBrown,
|
||||
error: errorRed,
|
||||
onError: Colors.white,
|
||||
surface: warmWhite,
|
||||
onSurface: charcoal,
|
||||
);
|
||||
|
||||
return ThemeData(
|
||||
useMaterial3: true,
|
||||
colorScheme: colorScheme,
|
||||
fontFamily: 'Georgia', // Serifed: transmite solidez institucional
|
||||
scaffoldBackgroundColor: warmWhite,
|
||||
appBarTheme: const AppBarTheme(
|
||||
backgroundColor: warmWhite,
|
||||
foregroundColor: charcoal,
|
||||
elevation: 0,
|
||||
scrolledUnderElevation: 1,
|
||||
),
|
||||
elevatedButtonTheme: ElevatedButtonThemeData(
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: leafGreen,
|
||||
foregroundColor: Colors.white,
|
||||
minimumSize: const Size(double.infinity, 54),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
),
|
||||
elevation: 3,
|
||||
shadowColor: leafGreen.withOpacity(0.4),
|
||||
textStyle: const TextStyle(
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w700,
|
||||
letterSpacing: 0.5,
|
||||
),
|
||||
),
|
||||
),
|
||||
inputDecorationTheme: InputDecorationTheme(
|
||||
filled: true,
|
||||
fillColor: Colors.white,
|
||||
contentPadding:
|
||||
const EdgeInsets.symmetric(horizontal: 16, vertical: 16),
|
||||
border: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
borderSide: const BorderSide(color: lightGray, width: 1.5),
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
borderSide: const BorderSide(color: lightGray, width: 1.5),
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
borderSide: const BorderSide(color: leafGreen, width: 2),
|
||||
),
|
||||
errorBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
borderSide: const BorderSide(color: errorRed, width: 1.5),
|
||||
),
|
||||
focusedErrorBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
borderSide: const BorderSide(color: errorRed, width: 2),
|
||||
),
|
||||
labelStyle: const TextStyle(color: midGray),
|
||||
hintStyle: TextStyle(color: midGray.withOpacity(0.7)),
|
||||
),
|
||||
cardTheme: CardThemeData(
|
||||
color: Colors.white,
|
||||
elevation: 2,
|
||||
shadowColor: Colors.black.withOpacity(0.08),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
),
|
||||
),
|
||||
snackBarTheme: SnackBarThemeData(
|
||||
backgroundColor: charcoal,
|
||||
contentTextStyle: const TextStyle(color: Colors.white, fontSize: 14),
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)),
|
||||
behavior: SnackBarBehavior.floating,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user