FLUTTER ECOSYSTEM

Oauth-Celestial/theme_manager_plus

Oauth-Celestial/theme_manager_plus open-source repository details.

theme_manager_plus のプロジェクト画像
Stars
1
Forks
0
最終プッシュ(UTC)
2024/09/21
プロジェクト状態
公開中
Ravi Pai GitHub avatar
GITHUB User

Ravi Pai ↗

言語C++CMakeDartHTMLSwiftCKotlinObjective-C

このリポジトリが公開するパッケージ

使用している依存関係

依存関係一覧 3 件
  • flutter{"sdk":"flutter"}
  • flutter_test開発用{"sdk":"flutter"}
  • flutter_lints開発用^2.0.0

元の README

以下は英語原文のスナップショットです。最新版は GitHub をご覧ください。

README を開く / 閉じる

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.