83 lines
2.9 KiB
Dart
83 lines
2.9 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
class AppColors {
|
|
static const bg = Color(0xFF0d0e11);
|
|
static const surface = Color(0xFF161820);
|
|
static const elevated = Color(0xFF1e2028);
|
|
static const border = Color(0xFF2a2d38);
|
|
static const accent = Color(0xFFf97316);
|
|
static const accentDim = Color(0xFF7c3a10);
|
|
static const text = Color(0xFFe2e8f0);
|
|
static const muted = Color(0xFF64748b);
|
|
static const danger = Color(0xFFef4444);
|
|
static const success = Color(0xFF22c55e);
|
|
}
|
|
|
|
ThemeData buildAppTheme() {
|
|
return ThemeData(
|
|
brightness: Brightness.dark,
|
|
scaffoldBackgroundColor: AppColors.bg,
|
|
colorScheme: const ColorScheme.dark(
|
|
primary: AppColors.accent,
|
|
surface: AppColors.surface,
|
|
error: AppColors.danger,
|
|
),
|
|
appBarTheme: const AppBarTheme(
|
|
backgroundColor: AppColors.surface,
|
|
foregroundColor: AppColors.text,
|
|
elevation: 0,
|
|
surfaceTintColor: Colors.transparent,
|
|
),
|
|
cardTheme: CardThemeData(
|
|
color: AppColors.surface,
|
|
elevation: 0,
|
|
shape: RoundedRectangleBorder(
|
|
borderRadius: BorderRadius.circular(12),
|
|
side: const BorderSide(color: AppColors.border),
|
|
),
|
|
margin: const EdgeInsets.symmetric(horizontal: 16, vertical: 6),
|
|
),
|
|
inputDecorationTheme: InputDecorationTheme(
|
|
filled: true,
|
|
fillColor: AppColors.elevated,
|
|
border: OutlineInputBorder(
|
|
borderRadius: BorderRadius.circular(10),
|
|
borderSide: const BorderSide(color: AppColors.border),
|
|
),
|
|
enabledBorder: OutlineInputBorder(
|
|
borderRadius: BorderRadius.circular(10),
|
|
borderSide: const BorderSide(color: AppColors.border),
|
|
),
|
|
focusedBorder: OutlineInputBorder(
|
|
borderRadius: BorderRadius.circular(10),
|
|
borderSide: const BorderSide(color: AppColors.accent, width: 1.5),
|
|
),
|
|
contentPadding: const EdgeInsets.symmetric(horizontal: 16, vertical: 14),
|
|
hintStyle: const TextStyle(color: AppColors.muted),
|
|
),
|
|
elevatedButtonTheme: ElevatedButtonThemeData(
|
|
style: ElevatedButton.styleFrom(
|
|
backgroundColor: AppColors.accent,
|
|
foregroundColor: Colors.white,
|
|
minimumSize: const Size(double.infinity, 48),
|
|
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)),
|
|
textStyle: const TextStyle(fontWeight: FontWeight.w600, fontSize: 15),
|
|
),
|
|
),
|
|
textButtonTheme: TextButtonThemeData(
|
|
style: TextButton.styleFrom(
|
|
foregroundColor: AppColors.accent,
|
|
),
|
|
),
|
|
dividerTheme: const DividerThemeData(
|
|
color: AppColors.border,
|
|
thickness: 1,
|
|
),
|
|
snackBarTheme: SnackBarThemeData(
|
|
backgroundColor: AppColors.elevated,
|
|
contentTextStyle: const TextStyle(color: AppColors.text),
|
|
behavior: SnackBarBehavior.floating,
|
|
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)),
|
|
),
|
|
);
|
|
}
|