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

パッケージ詳細v2.0.0

extendable_dropdown

ExtendableDropdown は、動的でカスタマイズ可能なドロップダウンメニューに適した多機能なFlutterパッケージです

AndroidiOSWebmacOSWindowsLinux
30日間ダウンロード
35
いいね数
2
Pub ポイント
155

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

flutter pub add extendable_dropdown

パッケージ概要

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

ExtendableDropdown は、複数のプラットフォームで動的でカスタマイズ可能なドロップダウンメニューを作成できる柔軟なFlutterパッケージです。単一選択と複数選択の両方をサポートしており、開発者がドロップダウンの外観や挙動を簡単にカスタマイズできます。Flutterアプリにスムーズに統合され、滑らかなアニメーションと応答性のあるデザインを提供します。Android、iOS、Web、macOS、Windows、Linuxをサポートしており、デバイス間で一貫したユーザー体験を確保します。フォーム、フィルター、設定インターフェースに最適で、直感的な操作パターンにより使いやすさを向上させます。

用途

  • フォーム入力
  • データのフィルタリング
  • ユーザーの設定
  • 設定パネル
  • 動的選択リスト
  • 複数選択ドロップダウン

主な機能

  • カスタマイズ可能なスタイル
  • 複数選択のサポート
  • スムーズなアニメーション
  • クロスプラットフォーム互換性
  • レスポンシブデザイン
  • 簡単な統合

適している対象

  • フォームを開発する開発者
  • 柔軟性を求めるUIデザイナー
  • 動的フィルタリングを必要とするアプリ
  • クロスプラットフォームのFlutterプロジェクト
  • インタラクティブなユーザーインターフェース

注意事項

  • 複雑なレイアウトには追加のスタイル設定が必要になる場合があります
  • 大規模なデータセットのパフォーマンスへの影響
  • 制限された組み込み検証
  • 非常に長いリストには最適化されていない
  • 慎重な状態管理が必要です
  • 高度な機能には外部の依存関係に依存しています

元の README

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

ExtendableDropdown

A Versatile Flutter Package for Dynamic, Generic Dropdown Menus (v1.0.4)

Introducing ExtendableDropdown, a production-ready Flutter package that empowers you to create dynamic and expandable multiple dropdown menus with full support for generic data types.

🚀 Key Features

  • Generic Type Support: Handle any data type (T) with full type safety. No longer restricted to strings!
  • Dynamic Slot Management: Add or remove dropdown slots on the fly with a simple, intuitive UI.
  • Dismissible Interaction: Swipe-to-dismiss functionality for removing selections with item return logic.
  • labelBuilder API: Complete control over how your custom objects are rendered as text in the dropdown.
  • Configurable UI Fragments: Pass your own Widgets for the Add Button and custom callbacks for message handling.
  • Fully Mutable-Safe: Built with immutability in mind, following Flutter's best practices for widget design.

📦 Installation

Add extendable_dropdown as a dependency in your pubspec.yaml file:

dependencies:
  extendable_dropdown: ^1.0.4

Import the package in your Flutter code:

import 'package:extendable_dropdown/extendable_dropdown.dart';

🛠 Usage

Simple Usage (Strings)
List<String> cities = ['Colombo', 'Kandy', 'Galle', 'Jaffna'];

ExtendableDropdown<String>(
  list: cities,
  onSendListChanged: (selectedItems) {
    print('Selected cities: $selectedItems');
  },
)
Advanced Usage (Custom Objects & UI)

You can use any custom model and fully override the UI.

ExtendableDropdown<Location>(
  list: myLocationList,
  onSendListChanged: (selected) => print(selected),
  labelBuilder: (location) => location.name,
  // Completely custom add button
  addButton: ElevatedButton.icon(
    onPressed: null, // Logic is handled internally
    icon: Icon(Icons.add),
    label: Text("Add Location"),
  ),
  // Custom notification logic
  onMessage: (context, message) {
    MyCustomToast.show(message);
  },
)

🎨 Professional Customization

ExtendableDropdown comes with a wide range of styling options:

Property Description Default
list The initial list of items to choose from. Required
onSendListChanged Callback triggered when the selection changes. Required
labelBuilder Function to map generic items to strings. item.toString()
addButton Widget: Custom widget for the add button. Styled default button
onMessage Callback: Handle custom alerts/notifications. Default SnackBar
dismissibleBackgroundColor Color shown when swiping to delete. Colors.red
selectedIcon Icon shown for a selected slot. Icons.radio_button_checked
nonSelectedIcon Icon shown for an empty slot. Icons.location_on_outlined
dropdownBorderRadius Border radius of the dropdown container. 10.0
Check out the [example](file:///Users/mymac/Documents/MyProjects/extendable_dropdown/example/lib/main.dart) folder for a full implementation!

🚧 Roadmap

  • [x] Generic data type support (Completed)
  • [x] Improved state management and immutability (Completed)
  • [ ] Searchable dropdown options
  • [ ] Multi-select within a single dropdown slot
  • [ ] Custom animation support for slot addition

🤝 Contributing

We welcome your feedback and contributions! Please feel free to open issues or submit pull requests.

📄 License

This project is licensed under the MIT License - see the [LICENSE](file:///Users/mymac/Documents/MyProjects/extendable_dropdown/LICENSE) file for details.


Made with ❤️ by Chanuka Ranathunga

カテゴリー

ソースリポジトリ

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

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