mirror of
https://github.com/R0m1k3/xtremflow.git
synced 2026-10-12 01:36:20 +02:00
feat: add CategoryCarousel for horizontal item display and CategoryChipButton for filtering
This commit is contained in:
1 parent
e699d3ec31
commit
343d4f439d
5 files changed
+411
-494
No files matched your search
@@ -1,73 +1,58 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
/// XtremFlow Cinematic Minimalist Palette
|
||||
/// XtremFlow Apple TV Style Palette
|
||||
///
|
||||
/// A deep, dark, and neutral palette designed for content-first experiences.
|
||||
/// Focuses on #0A0A0A backgrounds and subtle surfaces.
|
||||
/// Ultra minimalist, focus-driven palette.
|
||||
/// - Background: Pure Black (#000000)
|
||||
/// - Focus/Active: Pure White (#FFFFFF)
|
||||
/// - Inactive: Grey (#9E9E9E)
|
||||
/// - Glass: Heavy blur with low opacity
|
||||
class AppColors {
|
||||
AppColors._();
|
||||
|
||||
// ============ BACKGROUNDS ============
|
||||
/// Pitch black for OLED/Main backgrounds
|
||||
static const Color background = Color(0xFF0A0A0A);
|
||||
/// Pure black for that infinite depth look (OLED friendly)
|
||||
static const Color background = Color(0xFF000000);
|
||||
|
||||
/// Dark grey for cards/sheets
|
||||
static const Color surface = Color(0xFF141414);
|
||||
/// Very deep grey for surfaces that need to be distinct but subtle
|
||||
static const Color surface = Color(0xFF121212);
|
||||
|
||||
/// Slightly lighter for hover states or active items
|
||||
static const Color surfaceLight = Color(0xFF1F1F1F);
|
||||
|
||||
/// For inputs or secondary surfaces
|
||||
static const Color surfaceVariant = Color(0xFF2A2A2A);
|
||||
/// Focused element background (often white in tvOS for text, or bright accent)
|
||||
static const Color focusColor = Color(0xFFFFFFFF);
|
||||
|
||||
// ============ ACCENTS (MINIMALIST) ============
|
||||
/// Primary Brand Color (Electric Blue/Violet for modern feel)
|
||||
/// Replacing the old Gradient Cyan with a solid, punchy color.
|
||||
static const Color primary = Color(0xFF3F51B5); // Indigo
|
||||
|
||||
/// Secondary accent
|
||||
static const Color accent = Color(0xFF7986CB);
|
||||
// ============ ACCENTS ============
|
||||
/// Minimal white accent. In Apple TV, color is used sparingly.
|
||||
/// We keep a subtle blue only for specific indicators if needed.
|
||||
static const Color primary = Color(0xFFFFFFFF);
|
||||
static const Color accent = Color(0xFFE5E5E5);
|
||||
|
||||
/// Primary Gradient (Subtle, for buttons only)
|
||||
/// Primary Gradient (Subtle silver/white glow)
|
||||
static const LinearGradient primaryGradient = LinearGradient(
|
||||
colors: [primary, accent],
|
||||
colors: [Color(0xFFFFFFFF), Color(0xFFCCCCCC)],
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
);
|
||||
|
||||
// ============ TEXT ============
|
||||
/// Pure white for high contrast headers
|
||||
static const Color textPrimary = Color(0xFFFFFFFF);
|
||||
|
||||
/// Light grey for body text
|
||||
static const Color textSecondary = Color(0xFFB3B3B3);
|
||||
|
||||
/// Darker grey for hints/disabled
|
||||
static const Color textTertiary = Color(0xFF808080);
|
||||
|
||||
static const Color textSecondary = Color(0xFF9E9E9E); // Medium Grey
|
||||
static const Color textTertiary = Color(0xFF616161); // Darker Grey
|
||||
|
||||
// ============ FUNCTIONAL COLORS ============
|
||||
static const Color success = Color(0xFF4CAF50);
|
||||
static const Color warning = Color(0xFFFFC107);
|
||||
static const Color error = Color(0xFFCF6679);
|
||||
static const Color info = Color(0xFF2196F3);
|
||||
static const Color live = Color(0xFFFF0000); // Standard Red for LIVE
|
||||
static const Color success = Color(0xFF4DB6AC); // Teal-ish
|
||||
static const Color warning = Color(0xFFFFB74D);
|
||||
static const Color error = Color(0xFFEF5350);
|
||||
static const Color live = Color(0xFFFF3B30); // Apple Red
|
||||
|
||||
// ============ BORDERS ============
|
||||
static const Color border = Color(0xFF333333);
|
||||
// Borders are usually hidden until focused
|
||||
static const Color border = Color(0xFF1F1F1F);
|
||||
static const Color focusBorder = Color(0xFFFFFFFF);
|
||||
|
||||
// ============ GLASSMORPHISM ============
|
||||
static final Color glassBackground = const Color(0xFF1E1E1E).withOpacity(0.7);
|
||||
static final Color glassBorder = const Color(0xFFFFFFFF).withOpacity(0.1);
|
||||
|
||||
// ============ CATEGORY COLORS (MUTED) ============
|
||||
static const List<Color> categoryColors = [
|
||||
Color(0xFF5C6BC0), // Indigo
|
||||
Color(0xFFAB47BC), // Purple
|
||||
Color(0xFFEF5350), // Red
|
||||
Color(0xFF26A69A), // Teal
|
||||
Color(0xFFFFA726), // Orange
|
||||
Color(0xFF78909C), // Blue Grey
|
||||
];
|
||||
// Apple TV uses this heavily for headers/overlays
|
||||
static final Color glassBackground = const Color(0xFF1E1E1E).withOpacity(0.6);
|
||||
static final Color glassBorder = const Color(0xFFFFFFFF).withOpacity(0.15);
|
||||
|
||||
// ============ THEME SCHEMES ============
|
||||
static ColorScheme get darkColorScheme => const ColorScheme.dark(
|
||||
@@ -76,23 +61,22 @@ class AppColors {
|
||||
surface: surface,
|
||||
background: background,
|
||||
error: error,
|
||||
onPrimary: Colors.white,
|
||||
onSecondary: Colors.white,
|
||||
onPrimary: Colors.black, // White text on buttons -> Black text on White buttons
|
||||
onSecondary: Colors.black,
|
||||
onSurface: textPrimary,
|
||||
onError: Colors.white,
|
||||
brightness: Brightness.dark,
|
||||
);
|
||||
|
||||
// Minimalist Light Scheme (if ever toggled)
|
||||
static ColorScheme get lightColorScheme => const ColorScheme.light(
|
||||
primary: primary,
|
||||
secondary: accent,
|
||||
surface: Color(0xFFF5F5F5),
|
||||
primary: Colors.black,
|
||||
secondary: Colors.grey,
|
||||
surface: Color(0xFFF2F2F7),
|
||||
background: Colors.white,
|
||||
error: error,
|
||||
onPrimary: Colors.white,
|
||||
onSecondary: Colors.black,
|
||||
onSurface: Color(0xFF121212),
|
||||
onSecondary: Colors.white,
|
||||
onSurface: Colors.black,
|
||||
onError: Colors.white,
|
||||
brightness: Brightness.light,
|
||||
);
|
||||
|
||||
+71
-115
@@ -2,9 +2,9 @@ import 'package:flutter/material.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'app_colors.dart';
|
||||
|
||||
/// XtremFlow Cinematic Minimalist Theme
|
||||
/// XtremFlow Apple TV Theme
|
||||
///
|
||||
/// Refined, content-first theme. Less noise, more focus.
|
||||
/// Focus-driven, immersive, minimal.
|
||||
class AppTheme {
|
||||
AppTheme._();
|
||||
|
||||
@@ -15,15 +15,20 @@ class AppTheme {
|
||||
static const double spacing16 = 16.0;
|
||||
static const double spacing24 = 24.0;
|
||||
static const double spacing32 = 32.0;
|
||||
static const double spacing48 = 48.0; // Larger spacing for TV feel
|
||||
|
||||
// ============ RADIUS (Tighter for professional look) ============
|
||||
static const double radiusSm = 6.0;
|
||||
static const double radiusMd = 8.0;
|
||||
static const double radiusLg = 12.0;
|
||||
static const double radiusXl = 16.0;
|
||||
static const double radiusFull = 999.0;
|
||||
// ============ RADIUS ============
|
||||
static const double radiusSm = 8.0;
|
||||
static const double radiusMd = 12.0;
|
||||
static const double radiusLg = 16.0;
|
||||
static const double radiusXl = 24.0;
|
||||
|
||||
// ============ DARK THEME (Main) ============
|
||||
// ============ ANIMATION ============
|
||||
static const Duration durationFast = Duration(milliseconds: 200);
|
||||
static const Duration durationNormal = Duration(milliseconds: 300);
|
||||
static const Curve curveDefault = Curves.easeOutCubic;
|
||||
|
||||
// ============ DARK THEME (TV Main) ============
|
||||
static ThemeData get darkTheme {
|
||||
final baseTheme = ThemeData.dark(useMaterial3: true);
|
||||
|
||||
@@ -31,163 +36,114 @@ class AppTheme {
|
||||
colorScheme: AppColors.darkColorScheme,
|
||||
scaffoldBackgroundColor: AppColors.background,
|
||||
|
||||
// AppBar: Minimalist, blends with background
|
||||
// AppBar: Totally transparent, content floats below
|
||||
appBarTheme: AppBarTheme(
|
||||
backgroundColor: AppColors.background, // Seamless
|
||||
backgroundColor: Colors.transparent,
|
||||
surfaceTintColor: Colors.transparent,
|
||||
elevation: 0,
|
||||
centerTitle: false,
|
||||
iconTheme: const IconThemeData(color: AppColors.textPrimary),
|
||||
centerTitle: true,
|
||||
iconTheme: const IconThemeData(color: AppColors.textSecondary),
|
||||
titleTextStyle: GoogleFonts.inter(
|
||||
fontSize: 20,
|
||||
fontSize: 16,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: AppColors.textPrimary,
|
||||
color: AppColors.textSecondary,
|
||||
letterSpacing: 0.5,
|
||||
),
|
||||
),
|
||||
|
||||
// Navigation: Simple, functional
|
||||
// NavigationBar: Minimal, often just icons or text
|
||||
navigationBarTheme: NavigationBarThemeData(
|
||||
backgroundColor: AppColors.background,
|
||||
surfaceTintColor: Colors.transparent,
|
||||
indicatorColor: AppColors.primary.withOpacity(0.15),
|
||||
backgroundColor: Colors.transparent,
|
||||
indicatorColor: Colors.transparent,
|
||||
labelBehavior: NavigationDestinationLabelBehavior.alwaysShow,
|
||||
height: 80,
|
||||
iconTheme: WidgetStateProperty.resolveWith((states) {
|
||||
final isSelected = states.contains(WidgetState.selected);
|
||||
// Selected: White and slightly larger/glowing
|
||||
// Unselected: Grey and smaller
|
||||
return IconThemeData(
|
||||
color: isSelected ? AppColors.focusColor : AppColors.textSecondary,
|
||||
size: isSelected ? 28 : 24,
|
||||
);
|
||||
}),
|
||||
labelTextStyle: WidgetStateProperty.resolveWith((states) {
|
||||
final isSelected = states.contains(WidgetState.selected);
|
||||
return GoogleFonts.inter(
|
||||
fontSize: 12,
|
||||
fontWeight: isSelected ? FontWeight.w600 : FontWeight.w500,
|
||||
color: isSelected ? AppColors.textPrimary : AppColors.textSecondary,
|
||||
color: isSelected ? AppColors.focusColor : AppColors.textSecondary,
|
||||
);
|
||||
}),
|
||||
iconTheme: WidgetStateProperty.resolveWith((states) {
|
||||
final isSelected = states.contains(WidgetState.selected);
|
||||
return IconThemeData(
|
||||
color: isSelected ? AppColors.textPrimary : AppColors.textSecondary,
|
||||
);
|
||||
}),
|
||||
),
|
||||
|
||||
// NavigationRail (Desktop)
|
||||
navigationRailTheme: NavigationRailThemeData(
|
||||
backgroundColor: AppColors.background,
|
||||
indicatorColor: AppColors.primary.withOpacity(0.15),
|
||||
selectedIconTheme: const IconThemeData(color: AppColors.textPrimary),
|
||||
unselectedIconTheme: const IconThemeData(color: AppColors.textSecondary),
|
||||
selectedLabelTextStyle: GoogleFonts.inter(
|
||||
color: AppColors.textPrimary,
|
||||
fontWeight: FontWeight.w600,
|
||||
fontSize: 12,
|
||||
),
|
||||
unselectedLabelTextStyle: GoogleFonts.inter(
|
||||
color: AppColors.textSecondary,
|
||||
fontWeight: FontWeight.w500,
|
||||
fontSize: 12,
|
||||
),
|
||||
),
|
||||
|
||||
// Cards: Flat, subtle border
|
||||
// Cards: No background by default, they pop on focus
|
||||
cardTheme: CardThemeData(
|
||||
color: AppColors.surface,
|
||||
surfaceTintColor: Colors.transparent,
|
||||
color: Colors.transparent, // Background comes from container in widget
|
||||
elevation: 0,
|
||||
margin: EdgeInsets.zero,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(radiusMd),
|
||||
side: const BorderSide(color: AppColors.border, width: 1),
|
||||
),
|
||||
margin: EdgeInsets.zero,
|
||||
),
|
||||
|
||||
// Inputs: Clean, filled
|
||||
// Inputs: Minimal, dark pills
|
||||
inputDecorationTheme: InputDecorationTheme(
|
||||
filled: true,
|
||||
fillColor: AppColors.surfaceVariant,
|
||||
contentPadding: const EdgeInsets.all(spacing16),
|
||||
fillColor: AppColors.surface,
|
||||
contentPadding: const EdgeInsets.symmetric(horizontal: spacing24, vertical: spacing16),
|
||||
border: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(radiusSm),
|
||||
borderSide: const BorderSide(color: AppColors.border),
|
||||
borderRadius: BorderRadius.circular(radiusFull), // Pill shape
|
||||
borderSide: BorderSide.none,
|
||||
),
|
||||
enabledBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(radiusSm),
|
||||
borderSide: const BorderSide(color: AppColors.border),
|
||||
borderRadius: BorderRadius.circular(radiusFull),
|
||||
borderSide: BorderSide.none,
|
||||
),
|
||||
focusedBorder: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(radiusSm),
|
||||
borderSide: const BorderSide(color: AppColors.primary),
|
||||
borderRadius: BorderRadius.circular(radiusFull),
|
||||
borderSide: const BorderSide(color: AppColors.focusColor, width: 2),
|
||||
),
|
||||
hintStyle: GoogleFonts.inter(color: AppColors.textTertiary),
|
||||
labelStyle: GoogleFonts.inter(color: AppColors.textSecondary),
|
||||
),
|
||||
|
||||
// Buttons: Sharp, reliable
|
||||
// Buttons: White pill buttons usually
|
||||
filledButtonTheme: FilledButtonThemeData(
|
||||
style: FilledButton.styleFrom(
|
||||
backgroundColor: AppColors.primary,
|
||||
foregroundColor: Colors.white,
|
||||
backgroundColor: AppColors.focusColor, // White buttons
|
||||
foregroundColor: Colors.black, // Black text
|
||||
elevation: 0,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(radiusSm),
|
||||
borderRadius: BorderRadius.circular(radiusFull),
|
||||
),
|
||||
textStyle: GoogleFonts.inter(fontWeight: FontWeight.w600),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 16),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 32, vertical: 20),
|
||||
textStyle: GoogleFonts.inter(
|
||||
fontWeight: FontWeight.w700,
|
||||
fontSize: 16,
|
||||
),
|
||||
).copyWith(
|
||||
overlayColor: WidgetStateProperty.all(Colors.black.withOpacity(0.1)),
|
||||
),
|
||||
),
|
||||
|
||||
outlinedButtonTheme: OutlinedButtonThemeData(
|
||||
style: OutlinedButton.styleFrom(
|
||||
foregroundColor: AppColors.textPrimary,
|
||||
side: const BorderSide(color: AppColors.border),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(radiusSm),
|
||||
),
|
||||
textStyle: GoogleFonts.inter(fontWeight: FontWeight.w600),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 16),
|
||||
),
|
||||
),
|
||||
|
||||
// Text
|
||||
textTheme: TextTheme(
|
||||
displayLarge: GoogleFonts.inter(color: AppColors.textPrimary, fontWeight: FontWeight.bold),
|
||||
displayMedium: GoogleFonts.inter(color: AppColors.textPrimary, fontWeight: FontWeight.bold),
|
||||
headlineMedium: GoogleFonts.inter(color: AppColors.textPrimary, fontWeight: FontWeight.w600),
|
||||
titleLarge: GoogleFonts.inter(color: AppColors.textPrimary, fontWeight: FontWeight.w600),
|
||||
titleMedium: GoogleFonts.inter(color: AppColors.textPrimary, fontWeight: FontWeight.w500),
|
||||
bodyLarge: GoogleFonts.inter(color: AppColors.textSecondary, fontSize: 16),
|
||||
bodyMedium: GoogleFonts.inter(color: AppColors.textSecondary, fontSize: 14),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
// ============ LIGHT THEME (Minimalist) ============
|
||||
static ThemeData get lightTheme {
|
||||
final baseTheme = ThemeData.light(useMaterial3: true);
|
||||
final colors = AppColors.lightColorScheme;
|
||||
static const double radiusFull = 999.0;
|
||||
|
||||
return baseTheme.copyWith(
|
||||
colorScheme: colors,
|
||||
scaffoldBackgroundColor: colors.background,
|
||||
appBarTheme: AppBarTheme(
|
||||
backgroundColor: colors.background,
|
||||
foregroundColor: colors.onSurface,
|
||||
elevation: 0,
|
||||
centerTitle: false,
|
||||
iconTheme: IconThemeData(color: colors.onSurface),
|
||||
titleTextStyle: GoogleFonts.inter(
|
||||
fontSize: 20,
|
||||
fontWeight: FontWeight.w600,
|
||||
color: colors.onSurface,
|
||||
),
|
||||
),
|
||||
cardTheme: CardThemeData(
|
||||
color: colors.surface,
|
||||
elevation: 0,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(radiusMd),
|
||||
side: BorderSide(color: Colors.grey.shade300),
|
||||
),
|
||||
),
|
||||
textTheme: TextTheme(
|
||||
bodyLarge: GoogleFonts.inter(color: colors.onSurface),
|
||||
bodyMedium: GoogleFonts.inter(color: colors.onSurfaceVariant),
|
||||
),
|
||||
// Can expand light theme details later if needed
|
||||
);
|
||||
}
|
||||
// Light theme stub (TV interfaces rarely use light mode, but good for completeness)
|
||||
static ThemeData get lightTheme => ThemeData.light(useMaterial3: true).copyWith(
|
||||
colorScheme: AppColors.lightColorScheme,
|
||||
inputDecorationTheme: InputDecorationTheme(
|
||||
filled: true,
|
||||
fillColor: const Color(0xFFF2F2F7),
|
||||
border: OutlineInputBorder(
|
||||
borderRadius: BorderRadius.circular(radiusFull),
|
||||
borderSide: BorderSide.none)),
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user