dropdown_widgets 0.0.2 copy "dropdown_widgets: ^0.0.2" to clipboard
dropdown_widgets: ^0.0.2 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
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