Flutter圈子FlutterFlutter中文社区

Flutter 下拉多选

2019-07-07  本文已影响11人  树生1995

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.

上一篇 下一篇

猜你喜欢

热点阅读