92 lines
2.7 KiB
Dart
92 lines
2.7 KiB
Dart
import 'dart:ui';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:google_fonts/google_fonts.dart';
|
|
|
|
class AppTheme {
|
|
// --- Neo-Dark Color Palette ---
|
|
static const Color darkBg = Color(0xFF050505);
|
|
static const Color darkCard = Color(0xFF121212);
|
|
static const Color accentPurple = Color(0xFF7000FF);
|
|
static const Color accentBlue = Color(0xFF00D2FF);
|
|
static const Color accentCyan = Color(0xFF00FFD1);
|
|
|
|
static const Color secureGradientStart = Color(0xFF6A11CB);
|
|
static const Color secureGradientEnd = Color(0xFF2575FC);
|
|
|
|
static const Color glassWhite = Color(0x1AFFFFFF);
|
|
static const Color glassBorder = Color(0x33FFFFFF);
|
|
|
|
// --- Glassmorphism Styles ---
|
|
static BoxDecoration glassDecoration({double radius = 16}) {
|
|
return BoxDecoration(
|
|
color: glassWhite,
|
|
borderRadius: BorderRadius.circular(radius),
|
|
border: Border.all(color: glassBorder, width: 0.5),
|
|
boxShadow: [
|
|
BoxShadow(
|
|
color: Colors.black.withValues(alpha: 0.2),
|
|
blurRadius: 10,
|
|
spreadRadius: -2,
|
|
),
|
|
],
|
|
);
|
|
}
|
|
|
|
static Widget glassWrapper({
|
|
required Widget child,
|
|
double radius = 16,
|
|
double sigma = 10,
|
|
}) {
|
|
return ClipRRect(
|
|
borderRadius: BorderRadius.circular(radius),
|
|
child: BackdropFilter(
|
|
filter: ImageFilter.blur(sigmaX: sigma, sigmaY: sigma),
|
|
child: Container(
|
|
decoration: glassDecoration(radius: radius),
|
|
child: child,
|
|
),
|
|
),
|
|
);
|
|
}
|
|
|
|
// --- Theme Data ---
|
|
static ThemeData neoDarkTheme(Color seedColor) {
|
|
return ThemeData(
|
|
useMaterial3: true,
|
|
brightness: Brightness.dark,
|
|
scaffoldBackgroundColor: darkBg,
|
|
primaryColor: seedColor,
|
|
colorScheme: ColorScheme.fromSeed(
|
|
seedColor: seedColor,
|
|
brightness: Brightness.dark,
|
|
surface: darkCard,
|
|
onSurface: Colors.white,
|
|
),
|
|
textTheme: GoogleFonts.interTextTheme(ThemeData.dark().textTheme).copyWith(
|
|
displayLarge: GoogleFonts.poppins(
|
|
fontWeight: FontWeight.bold,
|
|
color: Colors.white,
|
|
),
|
|
titleMedium: GoogleFonts.inter(
|
|
fontWeight: FontWeight.w600,
|
|
color: Colors.white70,
|
|
),
|
|
),
|
|
appBarTheme: const AppBarTheme(
|
|
backgroundColor: Colors.transparent,
|
|
elevation: 0,
|
|
centerTitle: true,
|
|
titleTextStyle: TextStyle(fontSize: 20, fontWeight: FontWeight.bold),
|
|
),
|
|
cardTheme: CardThemeData(
|
|
color: darkCard,
|
|
elevation: 0,
|
|
shape: RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.circular(16),
|
|
side: const BorderSide(color: glassBorder, width: 0.5),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|