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

custom_radio_grouped_button のカバー
パッケージ詳細v2.3.0

custom_radio_grouped_button

カスタムラジオボタンとグループ化されたチェックボックスボタン

AndroidiOSWebmacOSWindowsLinux
30日間ダウンロード
1170
いいね数
156
Pub ポイント
140

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

flutter pub add custom_radio_grouped_button

パッケージ概要

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

複数のプラットフォームに対応するカスタマイズ可能なラジオボタンとグループ化されたチェックボックスボタンを提供するFlutterパッケージです。開発者が視覚的に明確でインタラクティブな選択コンポーネントを作成できるようにし、フォームやユーザー設定に最適です。柔軟なスタイル設定、簡単な統合、およびAndroid、iOS、Web、macOS、Windows、Linuxでの応答性のある動作を提供します。実装のシンプルさを保ちながらUIの一貫性を高めます。

用途

  • 単一選択付きフォーム入力
  • ユーザーの好み設定
  • アンケートまたはクイズインターフェース
  • カスタマイズ可能な UI コンポーネント
  • マルチプラットフォームアプリケーション

主な機能

  • カスタマイズ可能なボタンスタイル
  • グループ化選択ロジック
  • ラジオボタンおよびチェックボックスモードの両方をサポート
  • 複数プラットフォームにわたるレスポンシブデザイン
  • 既存のFlutterプロジェクトとの簡単な統合

適している対象

  • フォームを開発する開発者
  • カスタムコントロールを求めるUIデザイナー
  • クロスプラットフォームアプリ開発者
  • インタラクティブな選択ウィジェットを必要とするプロジェクト

注意事項

  • 選択状態の手動処理が必要です
  • 制限された組み込み検証
  • 複雑なレイアウトには追加のスタイリングが必要になる場合があります
  • 非常に大きなオプションリストには最適化されていません
  • 高度な機能には外部の依存関係に依存しています

元の README

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

custom_radio_grouped_button

Pub

Custom Radio Buttons and Grouped Check Box Button

Custom Flutter widgets that makes Checkbox and Radio Buttons much cleaner and easier

Installing

Add the following to your pubspec.yaml file:

dependencies:
  custom_radio_grouped_button: any

Creating Radio Button

CustomRadioButton(
  elevation: 0,
  absoluteZeroSpacing: true,
  unSelectedColor: Theme.of(context).canvasColor,
  buttonLables: [
    'Student',
    'Parent',
    'Teacher',
  ],
  buttonValues: [
    "STUDENT",
    "PARENT",
    "TEACHER",
  ],
  buttonTextStyle: ButtonTextStyle(
      selectedColor: Colors.white,
      unSelectedColor: Colors.black,
      textStyle: TextStyle(fontSize: 16)),
  radioButtonValue: (value) {
    print(value);
  },
  selectedColor: Theme.of(context).accentColor,
),

Creating Grouped Button

CustomCheckBoxGroup(
  buttonTextStyle: ButtonTextStyle(
    selectedColor: Colors.red,
    unSelectedColor: Colors.orange,
    textStyle: TextStyle(
      fontSize: 16,
    ),
    selectedTextStyle: TextStyle(
      fontSize: 20,
      fontWeight: FontWeight.w700,
    ),
  ),
  unSelectedColor: Theme.of(context).canvasColor,
  buttonLables: [
    "M",
    "T",
    "W",
    "T",
    "F",
    "S",
    "S",
  ],
  buttonValuesList: [
    "Monday",
    "Tuesday",
    "Wednesday",
    "Thursday",
    "Friday",
    "Saturday",
    "Sunday",
  ],
  checkBoxButtonValues: (values) {
    print(values);
  },
  spacing: 0,
  defaultSelected: "Monday",
  horizontal: false,
  enableButtonWrap: false,
  width: 40,
  absoluteZeroSpacing: false,
  selectedColor: Theme.of(context).accentColor,
  padding: 10, 
);

Changing values Programiically

You can acces the widget's state using Key now

Example: Create a key for the CustomRadioButton widget

final key = new GlobalKey<CustomRadioButtonState<T>>();

now to change the value of the widget pass the value to the selectButton method

key.currentState.selectButton(<value>);

Similarly for the CustomCheckBoxGroup widget

final key = new GlobalKey<CustomCheckBoxGroupState<T>>();

key.currentState.selectButton(<value>);

Screenshots

Grouped Button Grouped Button

カテゴリー

ソースリポジトリ

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

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