TKK_Nisa_E32221364/lib/utils/app_theme.dart

102 lines
3.3 KiB
Dart

import 'package:flutter/material.dart';
import 'app_colors.dart';
class AppTheme {
static ThemeData get lightTheme {
return ThemeData(
primarySwatch: Colors.deepOrange,
primaryColor: AppColors.primaryRed,
scaffoldBackgroundColor: AppColors.backgroundLight,
fontFamily: 'Roboto',
// AppBar theme
appBarTheme: const AppBarTheme(
backgroundColor: AppColors.primaryRed,
foregroundColor: AppColors.textLight,
elevation: 0,
centerTitle: true,
titleTextStyle: TextStyle(
fontSize: 20,
fontWeight: FontWeight.w600,
color: AppColors.textLight,
),
),
// Elevated button theme
elevatedButtonTheme: ElevatedButtonThemeData(
style: ElevatedButton.styleFrom(
backgroundColor: AppColors.primaryRed,
foregroundColor: AppColors.textLight,
elevation: 2,
padding: const EdgeInsets.symmetric(vertical: 16, horizontal: 32),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(12),
),
textStyle: const TextStyle(fontSize: 16, fontWeight: FontWeight.w600),
),
),
// Input decoration theme
inputDecorationTheme: InputDecorationTheme(
filled: true,
fillColor: AppColors.backgroundWhite,
contentPadding: const EdgeInsets.symmetric(
vertical: 16,
horizontal: 20,
),
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(12),
borderSide: BorderSide(color: AppColors.secondaryLightGray),
),
enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(12),
borderSide: BorderSide(color: AppColors.secondaryLightGray),
),
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(12),
borderSide: BorderSide(color: AppColors.primaryRed, width: 2),
),
errorBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(12),
borderSide: BorderSide(color: AppColors.textError),
),
hintStyle: TextStyle(color: AppColors.secondaryGray, fontSize: 16),
labelStyle: TextStyle(color: AppColors.textSecondary, fontSize: 16),
),
// Text theme
textTheme: const TextTheme(
headlineLarge: TextStyle(
fontSize: 32,
fontWeight: FontWeight.bold,
color: AppColors.textPrimary,
),
headlineMedium: TextStyle(
fontSize: 28,
fontWeight: FontWeight.w600,
color: AppColors.textPrimary,
),
headlineSmall: TextStyle(
fontSize: 24,
fontWeight: FontWeight.w600,
color: AppColors.textPrimary,
),
bodyLarge: TextStyle(fontSize: 16, color: AppColors.textPrimary),
bodyMedium: TextStyle(fontSize: 14, color: AppColors.textSecondary),
bodySmall: TextStyle(fontSize: 12, color: AppColors.textSecondary),
),
// Card theme
cardTheme: CardTheme(
color: AppColors.backgroundWhite,
elevation: 4,
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(16)),
shadowColor: AppColors.secondaryGray.withOpacity(0.2),
),
// Icon theme
iconTheme: const IconThemeData(color: AppColors.primaryRed, size: 24),
);
}
}