搜索插件、代码仓与 APP 分类

select_searchable_list 封面
插件详情v0.2.13

select_searchable_list

一个非常有用的 Flutter 小部件,用于从下拉列表中搜索单个或多个选项。

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
397
喜欢数
24
Pub 分数
140

安装插件

flutter pub add select_searchable_list

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

一个 Flutter 小部件,旨在简化在下拉列表中搜索单个或多个选项的过程。它提供了一个直观的可搜索界面,当从大型数据集中进行选择时,可提升用户体验。该小部件高度可定制,支持 Android、iOS、Web、macOS、Windows 和 Linux 等多种平台。非常适合需要高效过滤和选择的表单和数据输入界面。

适合场景

  • 具有大量选项列表的表单输入
  • 管理员仪表板中的动态筛选
  • 用户资料设置,包含类别选择
  • 可搜索的多选下拉菜单
  • 具有广泛选择的数据录入应用程序

主要特点

  • 实时搜索筛选
  • 支持单选和多选
  • 跨平台兼容性
  • 可自定义的用户界面和样式
  • 与现有表单轻松集成
  • 轻量且高效

适合对象

  • 开发数据密集型应用的开发者
  • 需要响应式搜索界面的团队
  • 需要多选下拉列表的项目
  • 以UI/UX为重点的Flutter应用
  • 针对多个操作系统的应用程序

使用建议

  • 可能需要为复杂主题添加额外的样式
  • 有限的内置验证功能
  • 性能取决于数据集大小
  • 未针对没有分页的超大数据集进行优化
  • 需要手动处理选择回调

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

Dropdown Searchable List Choices

A very useful widget for searching through single or multiple options from a drop-down list.

Platforms

This plugin has been successfully tested on iOS, Android & web.

Examples

The following examples are extracted from the example project available in the repository. More examples are available in this project.

Demo of Dropdown Searchable list with choices

drop-down-list

How to Use

          // ####### Data Sample (API Response)
          // Data value Api
          final Map<int, String> _listCategories = {1:'Boot', 2: 'Casual', 3: 'Flat', 4: 'Flip',  5: 'Lace up', 6: 'Loafer', 7: 'Slip-on', 8: 'Moccasins'};
          // Default value
          final List<int> _selectedCategory = [1];
          // Data value Api
          final Map<int, String> _listColors = {1:'Black', 2: 'Blue', 3: 'Brown', 4: 'Gold',  5: 'Green', 6: 'Grey', 7: 'Orange', 8: 'Pink', 9: 'Purple', 10: 'Red'};
          // Default value
          final List<int> _selectedColors = [2,4];
  
          // ####### Category Select List
          DropDownTextField(
            textEditingController: _categoryTextEditingController,
            title: 'Category',
            hint: 'Select Category',
            options: _listCategories,
            selectedOptions: _selectedCategory,
            onChanged: (selectedIds) {
              // setState(() => selectedIds);
            },
          ),

          // ####### Colors Select List
          DropDownTextField(
            textEditingController: _colorsTextEditingController,
            title: 'Colors',
            hint: 'Select Colors',
            options: _listColors,
            selectedOptions: _selectedColors,
            onChanged: (selectedIds) {
              // setState(() => selectedIds);
            },
            multiple: true,
          ),
Required parameters
data:

This property takes List as a parameter and it is useful to display items in drop down list.

Optional parameters
listBuilder:

This property takes int value as a parameter. This is use to set the initial segment from [segmentNames].

enableMultipleSelection:

This property takes Color value as a parameter. You can change the background color of animated segment.

bottomSheetTitle:

This gives the bottom sheet title.

submitButtonChild:

You can set your custom submit button when the multiple selection is enabled.

selectedItems:

This will give the call back to the selected items from list.

dropDownBackgroundColor:

This will set the background color to the Dropdown Searchable.

searchWidget:

This property takes TextFormField value as a parameter. [searchWidget] is use to show the text box for the searching. If you are passing your own widget then you must have to add [TextEditingController] for the [TextFormField].

isSearchVisible:

This property takes bool value as a parameter. [isSearchVisible] is use to manage the search widget visibility. by default it is [True] so widget will be visible.

LICENSE!

Dropdown Searchable list is MIT-licensed.

Additional information

    init_number=0; build_number=$(($(git rev-list HEAD --count) + init_number)); major=$((build_number / 2000)); minor=$(( (build_number / 20) % 10 )); patch=$((build_number % 20)); patch=$(printf "%02d" $patch); version="$major.$minor.$patch"; echo "version: $version+$build_number"

    dart fix --apply && flutter analyze

    flutter pub publish --dry-run

    flutter pub publish --force

Let us know!

I would be happy if you send us feedback on your projects where you use our component. Just email amir.email@gmail.com and let me know if you have any questions or suggestions about my work.

所属分类

依赖

依赖清单 1 项

源码仓库

使用此插件的项目

暂无相关数据。