app_theme

 avatar
unknown
plain_text
10 months ago
4.4 kB
19
Indexable
import 'package:flutter/material.dart';

class AppTheme {
  // Black and White Color Scheme
  static const Color primaryColor = Color(0xFF000000); // Black
  static const Color primaryLightColor = Color(0xFFF5F5F5); // Light Gray
  static const Color primaryDarkColor = Color(0xFF000000); // Black
  static const Color accentColor = Color(0xFF424242); // Dark Gray
  static const Color textColor = Color(0xFF000000); // Black
  static const Color secondaryTextColor = Color(0xFF757575); // Medium Gray
  static const Color backgroundColor = Color(0xFFFFFFFF); // White
  static const Color textWhiteColor = Color(0xFFFFFFFF); // White
  static const Color bgBlack = Color(0xFF000000); // Black

  // Text Styles
  static TextStyle headlineLarge = TextStyle(
    fontSize: 28,
    fontWeight: FontWeight.bold,
    color: textColor,
  );

  static TextStyle headlineMedium = TextStyle(
    fontSize: 24,
    fontWeight: FontWeight.bold,
    color: textColor,
  );

  static TextStyle headlineMediumWhite = TextStyle(
    fontSize: 24,
    fontWeight: FontWeight.bold,
    color: textWhiteColor,
  );

  static TextStyle headlineSmall = TextStyle(
    fontSize: 20,
    fontWeight: FontWeight.bold,
    color: textColor,
  );

  static TextStyle headlineSmallWhite = TextStyle(
    fontSize: 20,
    fontWeight: FontWeight.bold,
    color: textWhiteColor,
  );

  // Added titleMedium style
  static TextStyle titleMedium = TextStyle(
    fontSize: 16,
    fontWeight: FontWeight.w500,
    color: textColor,
  );

  static TextStyle titleMediumWhite = TextStyle(
    fontSize: 16,
    fontWeight: FontWeight.w500,
    color: textWhiteColor,
  );

  static TextStyle bodyLarge = TextStyle(fontSize: 16, color: textColor);
  static TextStyle bodyMedium = TextStyle(
    fontSize: 14,
    color: secondaryTextColor,
  );

  static TextStyle bodyMediumWhite = TextStyle(
    fontSize: 14,
    color: textWhiteColor,
  );

  static TextStyle bodySmall = TextStyle(
    fontSize: 12,
    color: secondaryTextColor,
  );

  // Button Styles
  static ButtonStyle primaryButtonStyle = ElevatedButton.styleFrom(
    backgroundColor: primaryColor,
    foregroundColor: Colors.white,
    shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)),
    elevation: 4,
    minimumSize: Size(double.infinity, 50),
  );

  static ButtonStyle secondaryButtonStyle = ElevatedButton.styleFrom(
    backgroundColor: Colors.white,
    foregroundColor: primaryColor,
    side: BorderSide(color: primaryColor),
    shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(20)),
    minimumSize: Size(double.infinity, 50),
  );

  static ButtonStyle textButtonStyle = TextButton.styleFrom(
    foregroundColor: primaryColor,
  );

  // Input Decoration
  static InputDecoration inputDecoration(String labelText, IconData? icon) {
    return InputDecoration(
      labelText: labelText,
      prefixIcon: icon != null ? Icon(icon, color: secondaryTextColor) : null,
      border: OutlineInputBorder(borderRadius: BorderRadius.circular(12)),
      filled: true,
      fillColor: primaryLightColor,
      labelStyle: TextStyle(color: secondaryTextColor),
    );
  }

  // Card Theme
  static BoxDecoration cardDecoration = BoxDecoration(
    color: Colors.white,
    borderRadius: BorderRadius.circular(16),
    boxShadow: [
      BoxShadow(
        color: Colors.black.withValues(alpha: 0.1),
        blurRadius: 8,
        offset: Offset(0, 4),
      ),
    ],
  );

  // Gradient Background
  static Gradient backgroundGradient = LinearGradient(
    begin: Alignment.topCenter,
    end: Alignment.bottomCenter,
    colors: [
      Color(0xFFEEEEEE),
      Color(0x00f5f5f5),
    ], // Light gray to slightly lighter gray
  );

  // Loading Indicator
  static Widget loadingIndicator() {
    return SizedBox(
      width: 20,
      height: 20,
      child: CircularProgressIndicator(
        strokeWidth: 2,
        valueColor: AlwaysStoppedAnimation<Color>(primaryColor),
      ),
    );
  }

  // SnackBar Colors
  static Color successSnackBarColor = Color(0xFF424242); // Dark Gray
  static Color errorSnackBarColor = Color(0xFF000000); // Black
  static Color warningSnackBarColor = Color(0xFF616161); // Medium Gray
}
Editor is loading...
Leave a Comment