Tis a common class, usually, it is the type of your data. Such as
double. The value will be this class same as the
T. The child will show in the menu. It is a widget, I use a Text in the fore example. In this example, I will use a
Rowto show you.
isExpanded == true. It will expand the menu. When you click it, it will show you the right one.
var _value = "1";If you set it to other value, such
_value ="3".It will occur such error.
itemsto null, I will show the
elevationcontrols the shadow of the menu, we have used it so many time, so I will not tell this again in the other widgets. The
stylecontrols the Text in the menu. The
isDensewill reduce the height of the button. The
iconSizecontrols the size of the triangle-arrow. The result is below.
DropdownButton. It just jumps out a menu to select. It is easy to understand, but need care about the value must be in the range of values of the items.