Files
pluriwave/lib/tema/pluriwave_theme.dart
T
FreeTLab d8acf74771
Build & Deploy Pluriwave / Análisis de código (push) Successful in 10s
Build & Deploy Pluriwave / Build APK + AAB release (push) Successful in 1m19s
feat(ui): implement award mockup redesign
2026-05-20 21:29:47 +02:00

69 lines
2.3 KiB
Dart

import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
import 'pluriwave_motion.dart';
import 'pluriwave_tokens.dart';
abstract final class PluriWaveTheme {
static ThemeData dark() {
const tokens = PluriWaveTokens.dark;
final colorScheme = const ColorScheme.dark().copyWith(
primary: tokens.electricMagenta,
secondary: const Color(0xFF20E6FF),
tertiary: tokens.warmCoral,
surface: const Color(0xFF0B1024),
surfaceContainerLow: const Color(0xFF111831),
surfaceContainerHighest: const Color(0xFF202946),
onSurface: const Color(0xFFF7F2FF),
onPrimary: Colors.white,
);
return ThemeData(
useMaterial3: true,
colorScheme: colorScheme,
scaffoldBackgroundColor: tokens.deepViolet,
textTheme: GoogleFonts.plusJakartaSansTextTheme(ThemeData.dark().textTheme),
extensions: const <ThemeExtension<dynamic>>[
tokens,
PluriWaveMotion.dark,
],
appBarTheme: const AppBarTheme(
centerTitle: false,
backgroundColor: Colors.transparent,
foregroundColor: Color(0xFFF7F2FF),
elevation: 0,
scrolledUnderElevation: 0,
),
navigationBarTheme: NavigationBarThemeData(
backgroundColor: Colors.transparent,
indicatorColor: tokens.electricMagenta.withValues(alpha: 0.18),
labelTextStyle: WidgetStateProperty.resolveWith(
(states) => TextStyle(
fontWeight: states.contains(WidgetState.selected) ? FontWeight.w800 : FontWeight.w600,
fontSize: 12,
),
),
),
chipTheme: ChipThemeData(
backgroundColor: const Color(0x1FFFFFFF),
selectedColor: tokens.electricMagenta.withValues(alpha: 0.24),
side: BorderSide(color: tokens.glassBorder),
labelStyle: const TextStyle(fontWeight: FontWeight.w700),
),
cardTheme: CardThemeData(
elevation: 0,
color: colorScheme.surfaceContainerLow,
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(tokens.radiusMd),
),
),
);
}
}
extension PluriWaveThemeContextX on BuildContext {
PluriWaveTokens get pluriTokens => Theme.of(this).extension<PluriWaveTokens>() ?? PluriWaveTokens.dark;
PluriWaveMotion get pluriMotion => Theme.of(this).extension<PluriWaveMotion>() ?? PluriWaveMotion.dark;
}