Search packages, repositories and app categories

Package detailsv0.0.4

theme_manager_plus

No More theme data. Customise your theme with your theme class

AndroidiOSWebmacOSWindowsLinux
30-day downloads
24
Likes
20
Pub points
150

Install package

flutter pub add theme_manager_plus

Package Overview

Package selection guidance compiled from public package information, community data, and project usage.

ThemeManagerPlus simplifies theme management in Flutter apps by allowing developers to define custom theme classes, eliminating the need for repetitive theme data. It provides a clean, reusable approach to handling light and dark mode themes across platforms. With built-in support for Android, iOS, Web, macOS, Windows, and Linux, it ensures consistent UI experiences. The package streamlines theme switching and customization through intuitive APIs, making it ideal for apps requiring dynamic theming with minimal boilerplate.

Use cases

  • Dynamic theme switching
  • Cross-platform theme consistency
  • Custom theme class implementation
  • Light and dark mode management
  • App-wide theme customization

Key features

  • Custom theme class support
  • Built-in light/dark mode toggle
  • Platform-agnostic design
  • Minimal boilerplate
  • Easy integration with existing code

Suitable for

  • Flutter apps with complex theming needs
  • Developers seeking reusable theme logic
  • Multi-platform applications
  • Apps requiring user theme preferences
  • Projects emphasizing clean architecture

Considerations

  • Requires understanding of Flutter's theme system
  • May need additional state management
  • Not suitable for simple static themes
  • Depends on proper initialization
  • Limited documentation beyond basic setup

Original README

Original README snapshot from the linked source repository. Visit the repository for the latest content.

theme_manager_plus

Say goodbye to the hassle of remembering complex color schemes! With Theme Manager Plus, managing themes is a breeze. Simply create a class for light and dark themes, tweak your desired colors and styles, and enjoy a seamless and modern app experience. No more headaches, just easy and efficient theme management!

simulator-screen-recording-iphone-15-pro-2024-01-31-at-214253_5zDSZU03-ezgif com-video-to-gif-converter

Getting started

First, add theme_manager_plus as a dependency in your pubspec.yaml file

theme_manager_plus: ^[version]

Create Your own class which defines colors and styles which you have to inject e.g

class AppTheme {
  Color? backgroundColor;
  TextStyle? heading;
  TextStyle? subheading;

  AppTheme({this.backgroundColor, this.heading, this.subheading});
}

Wrap your material app with the ThemeMangerWrapper and assign your light and dark theme and set the current theme to initial theme you want

home:ThemeManagerPlus<AppTheme>(
          currentTheme: lightTheme,
          darkTheme: Darktheme,
          lightTheme: lightTheme,
          child: MyApp()),
    );

Access data from theme

context.themeOf<AppTheme>()?.backgroundColor

Note: Replace your class name with the custom class name

Change current theme with theme manager plus

 context.changeCurrentTheme<AppTheme>();

Check current theme is dark theme

bool isDarkMode context.isDarkMode<AppTheme>();

Contribution 🤝

Feel free to contribute and open pull requests. 🙌

Issues and Feedback 🐛

Feel free to post a feature requests or report a bug here.

Categories

Source repository

Projects using this package

No data available yet.