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

パッケージ詳細v0.1.0

thememode_selector

ライトモードとダークモードのThemeModeの切り替えを行うウィジェット(開発中ですが、正常に動作しています)

30日間ダウンロード
16
いいね数
46
Pub ポイント
40

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

flutter pub add thememode_selector

パッケージ概要

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

Flutterウィジェットで、ユーザーがライトモードとダークモードのテーマ間を簡単に切り替えられるようにします。シンプルさと統合性を重視して設計されており、複雑な設定なしにテーマ選択用のクリーンなインターフェースを提供します。現在開発中ですが、基本的な用途では機能的かつ安定しています。ライトまたはダーク表示のユーザー好みをサポートしたいアプリに最適です。このパッケージはオープンソースであり、透明性とコミュニティ貢献のためにGitHubにホストされています。

用途

  • ユーザーが制御する明るい/暗いテーマの切り替えを有効化
  • アプリ設定でのテーマ設定の統合
  • カスタマイズ可能なテーマによるアクセシビリティのサポート
  • ダイナミックなテーマを使用した応答性のあるUIの構築
  • デバイス間で一貫したデザイン体験を提供する

主な機能

  • テーマ選択用のシンプルで直感的なウィジェット
  • ライトおよびダークテーマモードの両方をサポートしています
  • オープンソースで積極的にメンテナンスされています
  • 最小限のセットアップが必要
  • Flutter のテーマシステムとスムーズに連携します

適している対象

  • テーマカスタマイズを備えたアプリを開発する開発者
  • アクセシビリティおよびユーザーの好みをターゲットとしたアプリ
  • Flutter の組み込みテーマを使用するプロジェクト
  • 軽量なテーマ管理を望むチーム
  • UXの一貫性に注力するフロントエンド開発者

注意事項

  • まだ完全に安定していません(開発中)
  • ライト/ダークモードのみに制限
  • 追加のテーマプリセットは利用できません
  • プラットフォーム固有の動作は異なる場合があります
  • 永続化されたテーマ状態の手動処理が必要です

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

ThemeModeSelector Widget

I am currently working with the concept of Theme's in Flutter and I wanted to build a widget which would allow me to switch between light and dark themes. Seeking a design for a simple toggle, I was lucky enough to stumble into some of Zhenya Karapetyan's amazing work on Dribbble. Zhenya's simple yet fun design of a toggle component would look very nice in Flutter, and it has some really cool animations which I wanted to learn.

Zhenya Karapetyan's Light/Dark Toggle

https://dribbble.com/shots/7635203-Light-Dark-mode-toggle-switcher/attachments/396864?mode=media

thememode_selector

A widget to toggle between a light or dark ThemeMode

Features

  • Configurable colors for background and foreground colors for both light and dark modes
  • API similar to standard Material Slider widget

Supported Platforms

  • Flutter Android
  • Flutter iOS
  • Flutter Web
  • Flutter Desktop

Installation

Add thememode_selector: ^0.1.0 to your pubspec.yaml configuration.

import 'package:thememode_selector/thememode_selector.dart'

How to use

Widget build(BuildContext context) {
  return Scaffold(
    appBar: AppBar(
      title: Text(title),
    ),
    body: Center(
      child: ThemeModeSelector(
        height: 39,
        onChanged: (mode) {
          print('ThemeMode changed to $mode');
          ThemeModeManager.of(context)!.themeMode = mode;
        },
      ),
    ),
  );
}

License

MIT

カテゴリー

ソースリポジトリ

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

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