Flutter DropDownMenu

Mercy Jemosop
Jul 27, 2021

--

DropdownButton

This is a material design button, it allows users to select an item from a number of drop-down items. The button has an arrow and the currently selected item. The setState function is used to update the state to the currently selected item each time a user makes changes to the drop-down.

simple drop down menu

Implementation 1

Implementation 2 : using a for -loop

Implementation 3: Using for-in Loop

Implementation 4:

Drop down attributes

change drop down icon : const Icon(Icons.arrow_downward).

Change the default text color : style: const TextStyle(color: Colors.deepPurple).

Increase drop down icon size: iconSize: 24.

change background color of drop-down menu items:

dropdownColor: blue5,

more drop down properties

--

--

Mercy Jemosop
Mercy Jemosop

Written by Mercy Jemosop

Software Developer. I am open to job referrals. connect with me on twitter @kipyegon_mercy

No responses yet