Skip to content
pubscout

multiselect

0.1.1, released 3 years ago by taimoorhassan.ml

A simple multiselect dropdown widget for Flutter.

WASM-ready
$ flutter pub add multiselect
Source repository

What it does

It provides a concise way to create a multi-select ComboBox or SelectBox widget in Flutter. It allows users to pick multiple options from a dropdown list and displays the selected values.

AI-written summary of version 0.1.1, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need a straightforward multi-select dropdown widget in your form.
  • You want to allow users to select multiple items from a list with minimal setup.

Skip it when

  • You need complex form builder integrations or advanced custom validations not provided by the widget.
  • You require extensive UI customization beyond the documented parameters.

Strengths

  • Very easy to set up and use with minimal boilerplate.
  • Supports generic types and custom value separators.

Weaknesses

  • Limited to dropdown-style multi-selection.
  • Relies on states_rebuilder which might not fit every app's architecture.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
1
class Home extends StatefulWidget {
  const Home({Key? key}) : super(key: key);

  @override
  _HomeState createState() => _HomeState();
}

class _HomeState extends State<Home> {
  List<String> selected = [];

  @override
  Widget build(BuildContext context) {
    return Scaffold(
        body: Center(
      child: Padding(
        padding: const EdgeInsets.all(20.0),
        child: DropDownMultiSelect(
          onChanged: (List<String> x) {
            setState(() {
              selected = x;
            });
          },
          options: ['a', 'b', 'c', 'd'],
          selectedValues: selected,
          whenEmpty: 'Select Something',
        ),
      ),
    ));
  }
}

Alternatives

Packages that do the same job and could replace multiselect.

Works with

Packages commonly used together with multiselect: ones it builds on, ones built on it, and its own family.