Flutter 下拉多选

作者: 树生1995 | 来源:发表于2019-07-07 09:16 被阅读11次

multiple_select

multiple_select.gif

A versatile and beautiful multi-drop-down component for App developers.🚀

Getting Started

dependencies:
 multiple_select: ^0.1.1

Usage example

MultipleSelect

MultipleSelect.showMultipleSelector(
                context,
                dataList: List.generate(15, (index) => MultipleSelectItem.build(value: index, display: '第$index项显示内容', content: '第$index项下拉内容')),
              ).then((selectedList) {
                if (selectedList != null) selectedList.forEach((item) => print(item.display));
              });

MultipleDropDown

MultipleDropDown(
          placeholder: '请选择',
          elements: List.generate(15, (index) => MultipleSelectItem.build(value: index, display: '第$index项显示内容', content: '第$index项下拉内容')),
          onConfirm: (elements) {
            elements.forEach((element) => print(element.display));
          },
        )

Contribute

We would ❤️ to see your contribution!

License

Distributed under the MIT license. See LICENSE for more information.

About

Created by Shusheng.

相关文章

网友评论

    本文标题:Flutter 下拉多选

    本文链接:https://www.haomeiwen.com/subject/ntzvhctx.html