dropdown_widgets 0.0.3 copy "dropdown_widgets: ^0.0.3" to clipboard
dropdown_widgets: ^0.0.3 copied to clipboard

A widget for selecting multiple options from a dropdown list.

A widget for selecting multiple options from a dropdown list.

import 'models/dropdown_option.dart';
import 'multi_select_dropdown.dart';

MultiSelectDropdown(
    options: List.generate(
        50,
        (index) => DropdownOption(
            value: 'Option $index',
            labelBuilder: (value) => Row(
                mainAxisAlignment: MainAxisAlignment.center,
                mainAxisSize: MainAxisSize.min,
                children: [
                const Icon(Icons.abc_rounded),
                Text(value),
                ],
            ),
            )),
    initialValues: [
        DropdownOption(
            value: 'Option 1',
            labelBuilder: (value) => Row(
            mainAxisAlignment: MainAxisAlignment.center,
            mainAxisSize: MainAxisSize.min,
            children: [
                const Icon(Icons.abc_rounded),
                Text(value),
            ],
            ),
        )
    ],
    onChanged: (List<DropdownOption<String>> selectedOption) {
        //Do something with the list
    },
)

Some of the options are listed below: #

  • List<DropdownOption

  • final List<DropdownOption

  • final DropdownHeaderOptions option for customizing the header;

  • void Function(List<DropdownOption

  • final bool Function(DropdownOption

  • final Widget Function({ required DropdownBodyBox dropdownBodyBox, required Widget bodyList, })? menuContainerBuilder: Customize dropdown menu container;

  • final double itemExtent: Option item extent;

  • final int? maxItemsBeforeScroll: Number of visible items in the menu view port;

  • final Widget? endAdornment: Widget added at the end of the dropdown;

  • final bool dismissOnAdd: If true menu will close after selection;

  • final HeaderItemBuilder

  • final double? popupHeight: Menu height;

  • final Duration debounceDuration: Search items debounce;

1
likes
140
points
22
downloads

Publisher

unverified uploader

Weekly Downloads

A widget for selecting multiple options from a dropdown list.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on dropdown_widgets