Files
PlayMaker/lib/classe/theme.dart
2026-03-16 22:09:01 +00:00

115 lines
3.9 KiB
Dart

import 'package:flutter/material.dart';
class AppTheme {
static const Color primaryRed = Color(0xFFE74C3C);
static const Color backgroundLight = Color(0xFFF5F7FA);
static const Color surfaceWhite = Colors.white;
static const Color successGreen = Color(0xFF00C853);
static const Color warningAmber = Colors.amber;
static const Color placarBackground = Color(0xFF266174);
static const Color placarDarkSurface = Color(0xFF16202C);
static const Color placarTimerBg = Color(0xFF2C3E50);
static const Color placarListCard = Color(0xFF263238);
static const Color myTeamBlue = Color(0xFF1E5BB2);
static const Color oppTeamRed = Color(0xFFD92C2C);
static const Color actionPoints = Colors.orange;
static const Color actionMiss = Colors.redAccent;
static const Color actionSteal = Colors.green;
static const Color actionAssist = Colors.blueGrey;
static const Color actionRebound = Color(0xFF1E2A38);
static const Color actionBlock = Colors.deepPurple;
static const Color statPtsBg = Color(0xFF1565C0);
static const Color statAstBg = Color(0xFF2E7D32);
static const Color statRebBg = Color(0xFF6A1B9A);
static const Color statPieBg = Color.fromARGB(255, 22, 32, 44);
static const Color coachBg = Color(0xFFFFF9C4);
// =========================================================
// ☀️ TEMA CLARO
// =========================================================
static ThemeData get lightTheme {
return ThemeData(
useMaterial3: true,
colorScheme: ColorScheme.fromSeed(
seedColor: primaryRed,
brightness: Brightness.light,
primary: primaryRed,
surface: backgroundLight,
),
appBarTheme: const AppBarTheme(
backgroundColor: backgroundLight,
foregroundColor: Colors.black87,
centerTitle: true,
elevation: 0.0,
),
// 👇 CORRETO: Classe CardThemeData
cardTheme: const CardThemeData(
color: surfaceWhite,
surfaceTintColor: Colors.transparent, // Evita o tom rosado do Material 3
elevation: 3.0,
margin: EdgeInsets.only(bottom: 12.0),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(15.0)),
side: BorderSide(color: Color(0xFFEEEEEE), width: 1.0),
),
),
inputDecorationTheme: InputDecorationTheme(
filled: true,
fillColor: surfaceWhite,
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(12.0),
borderSide: const BorderSide(color: Color(0xFFE0E0E0)),
),
),
);
}
// =========================================================
// 🌙 MODO ESCURO
// =========================================================
static ThemeData get darkTheme {
return ThemeData(
useMaterial3: true,
colorScheme: ColorScheme.fromSeed(
seedColor: primaryRed,
brightness: Brightness.dark,
primary: primaryRed,
surface: const Color(0xFF1E1E1E),
),
scaffoldBackgroundColor: const Color(0xFF121212),
appBarTheme: const AppBarTheme(
backgroundColor: Color(0xFF121212),
foregroundColor: Colors.white,
centerTitle: true,
elevation: 0.0,
),
// 👇 CORRETO: Classe CardThemeData
cardTheme: const CardThemeData(
color: Color(0xFF1E1E1E),
surfaceTintColor: Colors.transparent,
elevation: 3.0,
margin: EdgeInsets.only(bottom: 12.0),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(15.0)),
side: BorderSide(color: Color(0xFF2C2C2C), width: 1.0),
),
),
inputDecorationTheme: InputDecorationTheme(
filled: true,
fillColor: const Color(0xFF1E1E1E),
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(12.0),
borderSide: const BorderSide(color: Color(0xFF2C2C2C)),
),
),
);
}
}