Skip to main content

color_theme_fonts 0.1.8 copy "color_theme_fonts: ^0.1.8" to clipboard
color_theme_fonts: ^0.1.8 copied to clipboard

color_theme_font

๐ŸŽจ ColorThemeFonts - Ultimate Flutter Theme Manager #

Flutter Pub Version License Platform

A powerful Flutter package for seamless theme management, color palettes, typography, and dark/light mode support.

โœจ Features #

๐ŸŽจ Smart Color Management #

  • Automatic Dark/Light Mode with smooth transitions
  • Custom Color Palettes with easy configuration
  • Accessibility Ready with proper contrast ratios
  • Dynamic Theme Switching at runtime

๐Ÿ“ฑ Advanced Typography #

  • Google Fonts Integration (1000+ fonts)
  • Responsive Text Scaling for all screen sizes
  • Custom Text Theme management
  • Consistent Typography across your app

๐Ÿ”ง Easy to Use #

  • Zero Boilerplate setup
  • Hot Reload Friendly - See changes instantly
  • Production Ready - Tested and stable
  • Well Documented - Clear examples and API

๐Ÿ“ฆ Installation #

Add to your pubspec.yaml:

dependencies:
  color_theme_fonts: ^0.1.8
  google_fonts:   # Recommended for typography
  flutter_screenutil:

ู‘ู‘ู‘


๐Ÿ“ฑ Contact & Connect #

Follow us on Instagram for more examples and updates:

Instagram

๐ŸŽฌ Preview #

Theme Preview


๐Ÿงช Example #

import 'package:color_theme_fonts/confag/color/color.dart';
import 'package:color_theme_fonts/confag/color/config_color.dart';
import 'package:color_theme_fonts/confag/theme_all_conf.dart';
import 'package:color_theme_fonts/defult_text.dart';
import 'package:flutter/material.dart';
import 'package:color_theme_fonts/color_theme_fonts.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:google_fonts/google_fonts.dart';
void main() {
  runApp(const MyApp());
}

class MyApp extends StatefulWidget {
  const MyApp({super.key});

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  bool _isDarkMode = false;

  @override
  Widget build(BuildContext context) {
    // Configure theme


    return ScreenUtilInit(
      designSize: Size(360, 690),
      minTextAdapt: true,
      splitScreenMode: true,
      builder: (context, child) {
    TextThemeDefaults.updateLightTextStyles(
      displayLarge: GoogleFonts.bebasNeue(fontSize:  30.sp, color: const Color.fromARGB(255, 223, 92, 92)),
      headlineLarge: GoogleFonts.bebasNeue(fontSize:  20.sp, color: Colors.black),
    );

    AppColorsManager.updateLightColors(
      primary: const Color.fromARGB(255, 252, 2, 210),
      secondary: Colors.green,
      background: const Color.fromARGB(255, 221, 30, 30),
    );
        return MaterialApp(
          theme: AllTheme.lightTheme(),
          darkTheme: AllTheme.darkTheme(),
          themeMode: _isDarkMode ? ThemeMode.light : ThemeMode.dark,

          home: child,
        );
      },
      child: HomeScreen(
        isDarkMode: _isDarkMode,
        onThemeChanged: (value) {
          setState(() {
            _isDarkMode = value;
          });
        },
      ),
    );
    
    
    
    
    

  }
}

class HomeScreen extends StatelessWidget {
  final bool isDarkMode;
  final ValueChanged<bool> onThemeChanged;

  const HomeScreen({
    super.key,
    required this.isDarkMode,
    required this.onThemeChanged,
  });

  @override
  Widget build(BuildContext context) {
    final textTheme = Theme.of(context).textTheme;

    return Scaffold(
      appBar: AppBar(
        title: const Text('Theme Switcher'),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            const Text('Toggle Theme'),
            Switch(
              value: isDarkMode,
              onChanged: onThemeChanged,
            ),
            const SizedBox(height: 20),
            Text('Display Large', style: textTheme.displayLarge),
            Text('Headline Large', style: textTheme.headlineLarge),
            Text('Body Large', style: textTheme.bodyLarge),
          ],
        ),
      ),
      // backgroundColor: AppColors.getLightColor2(isDarkMode),
    );
  }
}