Skip to content

polystackacademy/flutter_multi_chip_select

Repository files navigation

flutter_multi_chip_select

License

A simple and versatile multiple chip select component for App developers, with different style.🚀

Getting Started

dependencies:
 flutter_multi_chip_select: ^0.1.0

Usage example

Bottom Popup with no filters

final multiSelectKey = GlobalKey<MultiSelectDropdownState>();
var menuItems = [1, 2, 3, 4, 5, 6];

FlutterMultiChipSelect(
      key: multiSelectKey,
      elements: List.generate(
        menuItems.length,
        (index) => MultiSelectItem<String>.simple(
            actions: [
              IconButton(
                icon: Icon(Icons.delete),
                onPressed: () {
                  setState(() {
                    menuItems.remove(menuItems[index]);
                  });
                  print("Delete Call at: " + menuItems[index].toString());
                },
              )
            ],
            title: "Item " + menuItems[index].toString(),
            value: menuItems[index].toString()),
      ),
      label: "Dropdown Select",
      values: [
        1, 2 // Pass Initial value array or leave empty array.
      ],
    )

Contribute

Any contribution is deeply appreciated.

License

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

About

About

Flutter package for multiple chip select.

Resources

License

Stars

Watchers

Forks

Packages

No packages published