パッケージ、リポジトリ、アプリカテゴリを検索

パッケージ詳細v0.0.4

theme_manager_plus

テーマデータはもうありません。テーマクラスでテーマをカスタマイズしてください

AndroidiOSWebmacOSWindowsLinux
30日間ダウンロード
24
いいね数
20
Pub ポイント
150

パッケージをインストール

flutter pub add theme_manager_plus

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

ThemeManagerPlus は、開発者がカスタムテーマクラスを定義できるようにすることで、Flutterアプリにおけるテーマ管理を簡素化し、繰り返しのテーマデータの必要性を排除します。クロスプラットフォームでライトモードとダークモードのテーマを扱うための明確で再利用可能なアプローチを提供します。Android、iOS、Web、macOS、Windows、Linux に対応しており、一貫したUI体験を保証します。直感的なAPIを通じてテーマ切り替えやカスタマイズを簡略化し、最小限のボイラープレートで動的テーマを必要とするアプリに最適です。

用途

  • ダイナミックテーマ切り替え
  • クロスプラットフォームのテーマの一貫性
  • カスタムテーマクラスの実装
  • ライトモードとダークモードの管理
  • アプリ全体のテーマカスタマイズ

主な機能

  • カスタムテーマクラスのサポート
  • 組み込みのライト/ダークモード切り替え
  • プラットフォームに依存しない設計
  • 最小限のボイラープレート
  • 既存のコードとの簡単な統合

適している対象

  • 複雑なテーマ設定が必要なFlutterアプリ
  • 再利用可能なテーマロジックを求める開発者
  • マルチプラットフォームアプリケーション
  • ユーザーのテーマ設定を必要とするアプリ
  • クリーンアーキテクチャに注力するプロジェクト

注意事項

  • Flutterのテーマシステムの理解が必要です
  • 追加の状態管理が必要になる可能性があります
  • シンプルな静的テーマには適していません
  • 適切な初期化に依存する
  • 基本的なセットアップを超えるドキュメントは限られている

元の README

関連するソースリポジトリの 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.

カテゴリー

ソースリポジトリ

このパッケージを使用しているプロジェクト

データはまだありません。