app_theme_kit 0.0.10 copy "app_theme_kit: ^0.0.10" to clipboard
app_theme_kit: ^0.0.10 copied to clipboard

A modular Flutter theming kit with light/dark mode, color schemes, text themes, and Material 3 subthemes.

๐Ÿ“ฆ app_theme_kit #

A reusable Material 3 theme package for Flutter apps with customizable color schemes, text styles, subthemes, and spacing constants.
Quickly set up consistent colors, typography, spacing, and component themes across your Flutter applications.


โœจ Features #

  • ๐ŸŽจ Customizable color system via AppColors
  • ๐ŸŒ— Light & Dark themes (developer-defined colors)
  • ๐Ÿ”ค Custom TextTheme using Google Fonts (Quicksand)
  • ๐Ÿ“ Design tokens: spacing, radius, elevation
  • ๐Ÿƒ Subthemes included:
    • AppBarTheme
    • CardTheme
    • TabBarTheme
    • NavigationBarTheme
    • BottomAppBarTheme
  • ๐Ÿงฑ Material 3 support
  • ๐Ÿงช Example app included (with Light/Dark switch toggle)

๐Ÿš€ Installation #

Add to your pubspec.yaml:

dependencies:
  app_theme_kit: ^0.0.9+1

Then run:

flutter pub get

๐Ÿ›  Usage #

Import the package:

import 'package:app_theme_kit/app_theme_kit.dart';

๐ŸŽจ Define Your Own Colors #

You are not forced to use static colors from the package.
Define your brand colors and inject them into the theme.

final lightColors = AppColors(
  primary: Colors.teal,
  secondary: Colors.orange,
  background: Colors.white,
  surface: Colors.grey.shade50,
  error: Colors.redAccent,
);

final darkColors = AppColors(
  primary: Colors.teal.shade200,
  secondary: Colors.orange.shade200,
  background: const Color(0xFF121212),
  surface: const Color(0xFF1E1E1E),
  error: Colors.red.shade300,
);

๐Ÿงฑ Apply Theme to Your App #

MaterialApp(
  title: 'My App',
  theme: AppTheme.light(colors: lightColors),
  darkTheme: AppTheme.dark(colors: darkColors),
  themeMode: ThemeMode.system,
  home: const HomePage(),
);

๐ŸŒ— Light / Dark Toggle (Example App) #

The example app demonstrates switching themes using a Switch widget:

Switch(
  value: isDarkMode,
  onChanged: (value) => isDarkModeNotifier.value = value,
);

This keeps theme control inside the application, not inside the package.


๐Ÿ”ค Typography Showcase #

Text("Display Large", style: Theme.of(context).textTheme.displayLarge),
Text("Title Medium", style: Theme.of(context).textTheme.titleMedium),
Text("Body Medium", style: Theme.of(context).textTheme.bodyMedium),

โœ… All text styles use GoogleFonts.quicksand by default.


๐Ÿงฉ Subthemes #

  • Cards
Card(
  child: Padding(
    padding: const EdgeInsets.all(AppSpacing.md),
    child: Text("Styled by AppCardTheme"),
  ),
);
  • TabBar
DefaultTabController(
  length: 2,
  child: Scaffold(
    appBar: AppBar(
      bottom: const TabBar(
        tabs: [Tab(text: "One"), Tab(text: "Two")],
      ),
    ),
  ),
);
  • NavigationBar
NavigationBar(
  selectedIndex: 0,
  destinations: const [
    NavigationDestination(icon: Icon(Icons.home), label: "Home"),
    NavigationDestination(icon: Icon(Icons.settings), label: "Settings"),
  ],
);
  • BottomAppBar
Scaffold(
  bottomNavigationBar: BottomAppBar(
    child: Padding(
      padding: const EdgeInsets.all(AppSpacing.md),
      child: Text(
        "This BottomAppBar uses AppBottomAppBarTheme",
        textAlign: TextAlign.center,
      ),
    ),
  ),
);

๐Ÿ“ Design Tokens (Spacing & Radius) #

Padding(
  padding: const EdgeInsets.all(AppSpacing.md),
  child: Container(
    decoration: BoxDecoration(
      borderRadius: BorderRadius.circular(AppSpacing.radiusMd),
      color: AppColors.cardBg,
    ),
    child: const Text("Consistent spacing & radius"),
  ),
);

โœ… Use AppSpacing for padding, margins, radius, and elevation to keep your UI consistent.


๐Ÿ“ฒ Example App #

An example app is included in the /example folder.

Run it with:

cd example
flutter run

It demonstrates:

  • Light/Dark themes
  • Typography styles
  • Cards, TabBar, NavigationBar, BottomAppBar
  • Spacing tokens in action

๐Ÿ“ท Screenshots #

Typography #

Typography

Home #

Home

Settings #

Settings

Dark mode #

Settings


๐Ÿค Contributing #

Contributions are welcome!

  • Open issues for bugs/features
  • Submit PRs with improvements
  • Share ideas in Discussions

๐Ÿ“„ License #

This project is licensed under the MIT License.
See LICENSE for details.

1
likes
150
points
142
downloads

Publisher

unverified uploader

Weekly Downloads

A modular Flutter theming kit with light/dark mode, color schemes, text themes, and Material 3 subthemes.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, google_fonts

More

Packages that depend on app_theme_kit