first commit
This commit is contained in:
131
lib/core/theme/app_theme.dart
Normal file
131
lib/core/theme/app_theme.dart
Normal file
@@ -0,0 +1,131 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'app_colors.dart';
|
||||
import 'app_typography.dart';
|
||||
import 'app_motion.dart';
|
||||
|
||||
class AppTheme {
|
||||
const AppTheme._();
|
||||
|
||||
static ThemeData get dark {
|
||||
final textTheme = AppTypography.darkTextTheme();
|
||||
|
||||
return ThemeData(
|
||||
useMaterial3: true,
|
||||
brightness: Brightness.dark,
|
||||
scaffoldBackgroundColor: AppColors.black,
|
||||
colorScheme: const ColorScheme.dark(
|
||||
primary: AppColors.neonRed,
|
||||
secondary: AppColors.bloodRed,
|
||||
surface: AppColors.surface,
|
||||
onPrimary: AppColors.white,
|
||||
onSecondary: AppColors.white,
|
||||
onSurface: AppColors.white,
|
||||
error: AppColors.error,
|
||||
outline: AppColors.border,
|
||||
),
|
||||
textTheme: textTheme,
|
||||
|
||||
// App Bar Theme - Centralized & Brutalist
|
||||
appBarTheme: AppBarTheme(
|
||||
backgroundColor: AppColors.black,
|
||||
elevation: 0,
|
||||
centerTitle: true,
|
||||
iconTheme: const IconThemeData(color: AppColors.white, size: 20),
|
||||
titleTextStyle: textTheme.headlineMedium?.copyWith(
|
||||
color: AppColors.white,
|
||||
),
|
||||
),
|
||||
|
||||
// Card Theme - Sharp Edges, Subtle Borders
|
||||
cardTheme: CardThemeData(
|
||||
color: AppColors.surface,
|
||||
elevation: 0,
|
||||
margin: EdgeInsets.zero,
|
||||
shape: const RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.zero,
|
||||
side: BorderSide(color: AppColors.border, width: 1),
|
||||
),
|
||||
),
|
||||
|
||||
// Input Decoration - Industrial / Terminal style
|
||||
inputDecorationTheme: InputDecorationTheme(
|
||||
filled: true,
|
||||
fillColor: AppColors.surface,
|
||||
contentPadding: const EdgeInsets.symmetric(horizontal: 16, vertical: 18),
|
||||
hintStyle: textTheme.bodySmall?.copyWith(color: AppColors.greyDark),
|
||||
labelStyle: textTheme.bodyMedium?.copyWith(color: AppColors.grey),
|
||||
border: const OutlineInputBorder(
|
||||
borderRadius: BorderRadius.zero,
|
||||
borderSide: BorderSide(color: AppColors.border),
|
||||
),
|
||||
enabledBorder: const OutlineInputBorder(
|
||||
borderRadius: BorderRadius.zero,
|
||||
borderSide: BorderSide(color: AppColors.border),
|
||||
),
|
||||
focusedBorder: const OutlineInputBorder(
|
||||
borderRadius: BorderRadius.zero,
|
||||
borderSide: BorderSide(color: AppColors.neonRed, width: 1.5),
|
||||
),
|
||||
errorBorder: const OutlineInputBorder(
|
||||
borderRadius: BorderRadius.zero,
|
||||
borderSide: BorderSide(color: AppColors.error),
|
||||
),
|
||||
),
|
||||
|
||||
// Button Themes
|
||||
filledButtonTheme: FilledButtonThemeData(
|
||||
style: FilledButton.styleFrom(
|
||||
backgroundColor: AppColors.neonRed,
|
||||
foregroundColor: AppColors.white,
|
||||
shape: const RoundedRectangleBorder(borderRadius: BorderRadius.zero),
|
||||
textStyle: textTheme.labelLarge,
|
||||
padding: const EdgeInsets.symmetric(vertical: 16, horizontal: 24),
|
||||
),
|
||||
),
|
||||
|
||||
outlinedButtonTheme: OutlinedButtonThemeData(
|
||||
style: OutlinedButton.styleFrom(
|
||||
foregroundColor: AppColors.white,
|
||||
side: const BorderSide(color: AppColors.white, width: 1.5),
|
||||
shape: const RoundedRectangleBorder(borderRadius: BorderRadius.zero),
|
||||
textStyle: textTheme.labelLarge,
|
||||
padding: const EdgeInsets.symmetric(vertical: 16, horizontal: 24),
|
||||
),
|
||||
),
|
||||
|
||||
// Navigation Bar - Custom Riotz Feel
|
||||
navigationBarTheme: NavigationBarThemeData(
|
||||
backgroundColor: AppColors.black,
|
||||
indicatorColor: AppColors.neonRed.withOpacity(0.1),
|
||||
labelTextStyle: WidgetStateProperty.resolveWith((states) {
|
||||
if (states.contains(WidgetState.selected)) {
|
||||
return textTheme.bodySmall?.copyWith(color: AppColors.neonRed, fontWeight: FontWeight.bold);
|
||||
}
|
||||
return textTheme.bodySmall?.copyWith(color: AppColors.grey);
|
||||
}),
|
||||
iconTheme: WidgetStateProperty.resolveWith((states) {
|
||||
if (states.contains(WidgetState.selected)) {
|
||||
return const IconThemeData(color: AppColors.neonRed, size: 24);
|
||||
}
|
||||
return const IconThemeData(color: AppColors.grey, size: 24);
|
||||
}),
|
||||
),
|
||||
|
||||
// Dialog Theme
|
||||
dialogTheme: const DialogThemeData(
|
||||
backgroundColor: AppColors.surface,
|
||||
elevation: 0,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.zero,
|
||||
side: BorderSide(color: AppColors.border, width: 1),
|
||||
),
|
||||
),
|
||||
|
||||
dividerTheme: const DividerThemeData(
|
||||
color: AppColors.border,
|
||||
thickness: 1,
|
||||
space: 1,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user