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

パッケージ詳細v0.0.7

multiselect_dropdown_flutter

選択すべてと検索オプションを備えたシンプルなマルチセレクトドロップダウン。単純なリストとマップのリストで動作します。

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

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

flutter pub add multiselect_dropdown_flutter

パッケージ概要

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

検索機能と「すべて選択」機能を備えたカスタマイズ可能なマルチセレクトドロップダウンを提供するFlutterパッケージです。シンプルなリストとマップのリストの両方をサポートしており、フォームやフィルターへの統合が簡単です。このドロップダウンはAndroid、iOS、Web、macOS、Windows、Linuxなど、すべての主要プラットフォームで互換性があります。大規模なデータセットから複数の項目を効率的に選択する必要があるアプリケーションに最適です。

用途

  • 複数選択可能なフォーム入力
  • 複数の基準でデータをフィルタリングする
  • ユーザーの好みの選択
  • ダッシュボード内の動的リスト選択
  • データ入力フォームにおけるユーザーエクスペリエンスの向上

主な機能

  • 検索可能なドロップダウン
  • すべて選択オプション
  • シンプルなリストとマップをサポートしています
  • クロスプラットフォーム互換性
  • カスタマイズ可能な UI
  • Flutter との簡単な統合

適している対象

  • 複数選択を含むフォームを開発する開発者
  • フィルターインターフェースを必要とするアプリ
  • 軽量なドロップダウンコンポーネントを必要とするプロジェクト
  • マルチプラットフォームアプリ用にFlutterを使用するチーム
  • マルチセレクト機能の最小限のセットアップを望むユーザー

注意事項

  • 複雑なデザインにはカスタムスタイルが必要になる場合があります
  • 制限された組み込み検証
  • 非常に大きなデータセットではパフォーマンスが低下する可能性があります
  • 空の選択に対して組み込みのエラー処理がない
  • 値の更新には外部の状態管理に依存する

元の README

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

  • A simple multiselect dropdown which has Select All and Search options.
  • You can use a simple list or a list of maps.

Features

MultiSelect Dropdown demo

  • Use MultiSelectDropdown for list of maps.
  • Use MultiSelectDropdown.simpleList for a simple list.

Getting started

  • Add the package in your flutter project.
  • Import the package import 'package:multiselect_dropdown_flutter/multiselect_dropdown_flutter.dart';.

Usage

class MultiSelectExample extends StatelessWidget {
  const MultiSelectExample({super.key});

  final List myList2 = const ['Dog', 'Cat', 'Mouse', 'Rabbit'];

  final List myList = const [
    {'id': 'dog', 'label': 'Dog'},
    {'id': 'cat', 'label': 'Cat'},
    {'id': 'mouse', 'label': 'Mouse'},
    {'id': 'rabbit', 'label': 'Rabbit'},
  ];

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Column(
        children: [
          MultiSelectDropdown(
            list: myList,
            initiallySelected: const [],
            onChange: (newList) {
              // your logic
            },
          ),
          const SizedBox(height: 50),
          MultiSelectDropdown.simpleList(
            list: myList2,
            initiallySelected: const [],
            onChange: (newList) {
              // your logic
            },
            includeSearch: true,
            includeSelectAll: true,
          ),
        ],
      ),
    );
  }
}

Parameters

Parameter Name Description
list List of options to select from
label label key in a Map to show as an option. Defaults to 'label'
id id key in a Map to identify an item. Defaults to 'id'
onChange onChange callback, passes new list as argument
numberOfItemsLabelToShow Number of items to show as text, beyond that it will show n selected
initiallySelected Initially selected list
boxDecoration Decoration for anchor element
isLarge Dropdown size
width Anchor and modal width
whenEmpty Text to show when nothing is selected
includeSelectAll Includes a select all button when true
includeSearch Includes a search option when true
textStyle TextStyle? for the text on anchor element
duration Duration? for debounce in search option. Defaults to 300 milliseconds.
checkboxFillColor checkbox fill color
splashColor splash color on list tile
listTextStyle text style for text on list tile


 

I will keep adding more functionalities.
You can raise an issue/feature request on github.
Please leave a like if you find this package useful.

カテゴリー

ソースリポジトリ

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

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