Patrick Obafemi
Patrick Obafemi

Reputation: 1066

Implementing Mutltiple select in dropdown button flutter

I want to implement a mutliple dropdown select button in flutter. Something similar to thismutiple select button

Here is my code

   Container(
        alignment: Alignment.centerLeft,
        decoration: BoxDecoration(
          color: Colors.white,
          borderRadius: BorderRadius.circular(10.0),
          boxShadow: [
            BoxShadow(
              color: Colors.black12,
              blurRadius: 6.0,
              offset: Offset(0, 2),
            ),
          ],
        ),
        height: 60.0,
        child: DropdownButtonFormField(
           decoration: InputDecoration(
            border: InputBorder.none,
            prefixIcon: Icon(
              Icons.location_city,
              color: Colors.black,
            )
          ),
          items: states.map((String dropDownStringItem) {
            return DropdownMenuItem<String>(
              value: dropDownStringItem,
              child: Text(dropDownStringItem),
            );
          }).toList(),
          onChanged: (value) {
            setState(() {
              print(value);
            });
          },
        ),
      ),

How would i implement it? I know i will have to use a formbuilder but I would appreciate it if i get help or probably pointed to a package that does this seamlessly.

Upvotes: 1

Views: 456

Answers (1)

janstol
janstol

Reputation: 3157

You can try these packages:

Upvotes: 2

Related Questions