import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; import '../../core/theme/app_colors.dart'; import '../../core/theme/app_theme.dart'; /// XtremFlow Mobile Theme (Touch-optimized) /// /// Adapted Apple TV Modern design for mobile screens: /// - Larger touch targets (48px minimum) /// - Vertical-first layouts /// - Bottom navigation /// - Mobile-friendly spacing class MobileTheme { MobileTheme._(); // ============ SPACING ============ static const double spacing4 = 4.0; static const double spacing8 = 8.0; static const double spacing12 = 12.0; static const double spacing16 = 16.0; static const double spacing20 = 20.0; static const double spacing24 = 24.0; // ============ RADIUS ============ static const double radiusSm = 8.0; static const double radiusMd = 12.0; static const double radiusLg = 16.0; // ============ DARK THEME (Mobile Main) ============ static ThemeData get darkTheme { final baseTheme = ThemeData.dark(useMaterial3: true); return baseTheme.copyWith( colorScheme: AppColors.darkColorScheme, scaffoldBackgroundColor: AppColors.background, canvasColor: AppColors.background, // ============ TYPOGRAPHY (Mobile-scaled) ============ textTheme: TextTheme( // Display - Large titles displayLarge: GoogleFonts.outfit( fontSize: 32, fontWeight: FontWeight.w800, letterSpacing: -1.0, height: 1.2, color: AppColors.textPrimary, ), // Display Medium displayMedium: GoogleFonts.outfit( fontSize: 28, fontWeight: FontWeight.w700, letterSpacing: -0.5, height: 1.25, color: AppColors.textPrimary, ), // Display Small displaySmall: GoogleFonts.outfit( fontSize: 24, fontWeight: FontWeight.w700, letterSpacing: -0.3, height: 1.3, color: AppColors.textPrimary, ), // Headline Medium headlineMedium: GoogleFonts.outfit( fontSize: 20, fontWeight: FontWeight.w700, letterSpacing: -0.2, height: 1.3, color: AppColors.textPrimary, ), // Headline Small headlineSmall: GoogleFonts.outfit( fontSize: 18, fontWeight: FontWeight.w600, letterSpacing: -0.1, height: 1.4, color: AppColors.textPrimary, ), // Title Large titleLarge: GoogleFonts.inter( fontSize: 16, fontWeight: FontWeight.w600, letterSpacing: 0, height: 1.4, color: AppColors.textPrimary, ), // Title Medium titleMedium: GoogleFonts.inter( fontSize: 14, fontWeight: FontWeight.w600, letterSpacing: 0.1, height: 1.4, color: AppColors.textPrimary, ), // Title Small titleSmall: GoogleFonts.inter( fontSize: 12, fontWeight: FontWeight.w600, letterSpacing: 0.1, height: 1.4, color: AppColors.textSecondary, ), // Body Large bodyLarge: GoogleFonts.inter( fontSize: 14, fontWeight: FontWeight.w400, letterSpacing: 0.2, height: 1.5, color: AppColors.textSecondary, ), // Body Medium bodyMedium: GoogleFonts.inter( fontSize: 12, fontWeight: FontWeight.w400, letterSpacing: 0.2, height: 1.5, color: AppColors.textSecondary, ), // Body Small bodySmall: GoogleFonts.inter( fontSize: 11, fontWeight: FontWeight.w400, letterSpacing: 0.3, height: 1.5, color: AppColors.textTertiary, ), // Label Large labelLarge: GoogleFonts.inter( fontSize: 12, fontWeight: FontWeight.w700, letterSpacing: 0.2, height: 1.4, color: AppColors.textPrimary, ), // Label Medium labelMedium: GoogleFonts.inter( fontSize: 11, fontWeight: FontWeight.w600, letterSpacing: 0.3, height: 1.4, color: AppColors.textPrimary, ), // Label Small labelSmall: GoogleFonts.inter( fontSize: 10, fontWeight: FontWeight.w600, letterSpacing: 0.5, height: 1.4, color: AppColors.textSecondary, ), ), // ============ APP BAR ============ appBarTheme: AppBarTheme( backgroundColor: Colors.transparent, foregroundColor: AppColors.textPrimary, elevation: 0, scrolledUnderElevation: 0, centerTitle: true, titleTextStyle: GoogleFonts.outfit( fontSize: 20, fontWeight: FontWeight.w700, color: AppColors.textPrimary, letterSpacing: -0.3, ), ), // ============ INPUTS ============ inputDecorationTheme: InputDecorationTheme( filled: true, fillColor: AppColors.surface, contentPadding: const EdgeInsets.symmetric( horizontal: spacing16, vertical: spacing12, ), border: OutlineInputBorder( borderRadius: BorderRadius.circular(radiusMd), borderSide: const BorderSide(color: AppColors.border), ), enabledBorder: OutlineInputBorder( borderRadius: BorderRadius.circular(radiusMd), borderSide: const BorderSide(color: AppColors.border, width: 1.5), ), focusedBorder: OutlineInputBorder( borderRadius: BorderRadius.circular(radiusMd), borderSide: const BorderSide(color: AppColors.primary, width: 2), ), hintStyle: GoogleFonts.inter( color: AppColors.textTertiary, fontSize: 14, ), ), // ============ BUTTONS (Mobile-sized) ============ filledButtonTheme: FilledButtonThemeData( style: FilledButton.styleFrom( backgroundColor: AppColors.primary, foregroundColor: Colors.black, elevation: 0, padding: const EdgeInsets.symmetric( horizontal: spacing20, vertical: spacing12, ), minimumSize: const Size(double.infinity, 48), shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(radiusMd), ), textStyle: GoogleFonts.inter( fontWeight: FontWeight.w700, fontSize: 14, ), ), ), outlinedButtonTheme: OutlinedButtonThemeData( style: OutlinedButton.styleFrom( foregroundColor: AppColors.primary, side: const BorderSide(color: AppColors.primary, width: 1.5), shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(radiusMd), ), padding: const EdgeInsets.symmetric( horizontal: spacing20, vertical: spacing12, ), minimumSize: const Size(double.infinity, 48), ), ), // ============ BOTTOM NAVIGATION ============ bottomNavigationBarTheme: BottomNavigationBarThemeData( backgroundColor: AppColors.surface, selectedItemColor: AppColors.primary, unselectedItemColor: AppColors.textSecondary, selectedLabelStyle: GoogleFonts.inter( fontSize: 11, fontWeight: FontWeight.w600, ), unselectedLabelStyle: GoogleFonts.inter( fontSize: 11, fontWeight: FontWeight.w500, ), type: BottomNavigationBarType.fixed, elevation: AppTheme.elevationMd, ), // ============ CARDS ============ cardTheme: CardThemeData( color: AppColors.surface, elevation: 0, margin: EdgeInsets.zero, shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(radiusLg), side: const BorderSide(color: AppColors.border), ), ), // ============ DIALOGS ============ dialogTheme: DialogThemeData( backgroundColor: AppColors.surface, elevation: AppTheme.elevationLg, shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(radiusLg), ), ), // ============ CHIPS ============ chipTheme: ChipThemeData( backgroundColor: AppColors.surfaceVariant, selectedColor: AppColors.primary, labelStyle: GoogleFonts.inter( fontSize: 12, fontWeight: FontWeight.w600, color: AppColors.textPrimary, ), padding: const EdgeInsets.symmetric( horizontal: spacing12, vertical: spacing8, ), shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(radiusMd), side: const BorderSide(color: AppColors.border), ), ), ); } // Light theme (fallback) static ThemeData get lightTheme { final baseTheme = ThemeData.light(useMaterial3: true); return baseTheme.copyWith( colorScheme: AppColors.darkColorScheme, textTheme: GoogleFonts.interTextTheme(baseTheme.textTheme), ); } }