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

パッケージ詳細v0.1.5

clean_settings

合理的なデフォルト値を備えた設定UIジェネレータ。ボイラープレートコードの必要性を排除し、豊富で非常に意図的なウィジェットを提供します。

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

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

flutter pub add clean_settings

パッケージ概要

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

Clean Settings は、事前に設計された意図のあるウィジェットと妥当なデフォルトを備えた Flutter パッケージで、設定インターフェースの作成を簡素化します。構造的で一貫した UI を提供することで、繰り返しのボイラープレートコードを排除し、開発者が迅速に洗練され、プロフェッショナルな外観の設定画面を構築できるようにします。このパッケージは使いやすさと視覚的な調和に重点を置き、セットアップ時間を短縮しながらカスタマイズの柔軟性を維持しています。直感的で整理された設定パネルが必要なアプリに最適です。

用途

  • アプリの設定画面の構築
  • ユーザー設定パネルの作成
  • 設定インターフェースの迅速なプロトタイピング
  • 設定におけるUIボイラープレートの削減
  • 一貫した設定レイアウトの設計

主な機能

  • 主張的な、すぐに使えるウィジェット
  • 妥当なデフォルトスタイル
  • 最小限のボイラープレート
  • 一貫したUIパターン
  • 既存のアプリとの簡単な統合

適している対象

  • 高速な設定UIを求めるFlutter開発者
  • 複雑なユーザー設定を持つプロジェクト
  • 洗練された、モダンな設定インターフェースを必要とするアプリ
  • デザインの一貫性を重視するチーム
  • 開発者が手動でのウィジェットスキャフォールディングを回避する

注意事項

  • 限定的なカスタマイズの柔軟性
  • 強い意見を持つデザインの選択
  • 非常にユニークなUIには適応が必要になる場合があります
  • 設定以外の用途には適していません
  • 更新についてはGitHubソースに依存しています

元の README

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

pub package

clean_settings

Settings UI generator with sane defaults.

Creating a settings screen requires the same boiler plate code over and over. Settings also need a rich set of widgets to cover all possible cases. This library aims to provide sane defaults while creating a setting screen.

Features

  • Setting Sections
  • Out-of-the-box widgets for multiple types
  • Read-only items

Widgets supported

  • Checkbox

Checkbox Widget


SettingCheckboxItem(
    title: 'Smart Reply',
    value: smartReply,
    onChanged: (v) => setState(() => smartReply = v),
    description: 'Show suggested replies when available'),
  • Switch

Switch Widget


SettingSwitchItem(
  title: 'Smart Compose',
  value: smartCompose,
  onChanged: (v) => setState(() => smartCompose = v),
  description: 'Show predictive writing suggestions',
  priority: ItemPriority.high,
),
  • Radio Picker

Radio Picker


SettingRadioItem<String>(
  title: 'Theme',
  displayValue: '$theme theme',
  selectedValue: theme,
  items: [
    SettingRadioValue('Light', 'Light'),
    SettingRadioValue('Dark', 'Dark'),
    SettingRadioValue('System Default', 'System Default'),
  ],
  onChanged: (v) => setState(() => theme = v),
),

  • Text Input

Text Input

SettingTextItem(
  title: 'Auto Reply Message',
  displayValue: autoReplyMessage,
  initialValue: autoReplyMessage,
  hintText: 'Sent by system on away',
  onChanged: (v) => setState(() => autoReplyMessage = v),
),

  • Date and Time Picker

Date Time Picker

SettingDateTimeItem<DateTime>(
  title: 'Next Scheduled Email At',
  displayValue: scheduledEmailSlug,
  onChanged: (v) => setState(() => scheduledEmailDateTime = v),
),
  • Date Picker

Date Picker

SettingDateTimeItem<DateTime>(
  title: 'Date of birth',
  displayValue: dateOfBirthSlug,
  onChanged: (v) => setState(() => dateOfBirth = v),
  timePicker: false,
),
  • Time Picker

Time Picker

SettingDateTimeItem<TimeOfDay>(
  title: 'Daily wake up email',
  displayValue: dailyEmailAt.format(context),
  onChanged: (v) => setState(() => dailyEmailAt = v),
  datePicker: false,
),
  • Wheel - Number List

Wheel Number

SettingWheelPickerItem(
  title: 'Days of mail to sync',
  displayValue: daysOfMailToSync.toString(),
  initialValueIndex: daysOfMailToSync,
  items: List.generate(10, (index) => index.toString()),
  onChanged: (v) => setState(() => daysOfMailToSync = v),
),
  • Wheel - Text

Wheel Text

var replyOptions = ['Reply', 'Reply All', 'Last Chosen', 'None'];
SettingWheelPickerItem(
  title: 'Default reply action',
  displayValue: replyOptions[chosenReplyOptionIndex],
  initialValueIndex: chosenReplyOptionIndex,
  items: replyOptions,
  onChanged: (v) => setState(() => chosenReplyOptionIndex = v),
),

  • Confirm Dialog

Confirm Dialog

SettingConfirmItem(
  title: 'Delete account',
  displayValue: 'Permanently deletes your account',
  alertTitle: 'Delete your account',
  alertMessage: 'Are you sure?',
  priority: ItemPriority.high,
  onConfirm: () => {},
  onCancel: () => {},
),

  • Custom Handler

Custom Handler

SettingItem(
  title: 'Simple Counter',
  displayValue: counter.toString(),
  onTap: () => setState(() => counter++),
),

Structure


Root - SettingContainer
         \
          \_ SettingSection
                 \
                  \_ SettingItem (or Variants) 

Common Options

  • priority

Set the priority of the item to one of:

  • ItemPriority.high - Shows red color
  • ItemPriority.normal - Default color
  • ItemPriority.low - Shows in green color
  • ItemPriority.disabled - Disables the item

Example

Creates a simple Checkbox setting item

SettingContainer(
  sections: [
    SettingSection(
      title: 'Appearance',
      items: [
        SettingCheckboxItem(
            title: 'Smart Reply',
            value: smartReply,
            onChanged: (v) => setState(() => smartReply = v),
            description: 'Show suggested replies when available'),
      ],
    ),
  ],
)

Notes

  • Early version
  • API bound to change as more widgets get added
  • Please report bugs/issues/features

Buy Me A Coffee

Buy Me A Coffee

カテゴリー

ソースリポジトリ

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

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