Search packages, repositories and app categories

GitHub repositoryOauth-Celestial/theme_manager_plus

theme_manager_plus

Oauth-Celestial/theme_manager_plus open-source repository details.

theme_manager_plus project cover
Stars
1
Forks
0
Last push (UTC)
Sep 21, 2024
Project status
Active

Original README

English project snapshot. Visit GitHub 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.

Ravi Pai GitHub avatar
GitHub author

Ravi Pai ↗

LanguagesC++CMakeDartHTMLSwiftCKotlinObjective-C

Packages published by this repository

Dependencies used

Dependency list 3 items

  • flutter{"sdk":"flutter"}
  • flutter_testDevelopment{"sdk":"flutter"}
  • flutter_lintsDevelopment^2.0.0

How do I choose a repository?

Start with your use case, compare repository activity, and check the original project before adopting it.

  1. Search by repository name, owner or description, then narrow the results by topic.
  2. Compare stars, forks and recent pushes. Stars show community interest, not a guarantee of quality.
  3. Read the README, license and issues on GitHub before using a project.

Sources and maintenance

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗