DropdownButton({Key key, @required List<DropdownMenuItem<T>> items, T value, Widget hint, @required ValueChanged<T> onChanged, int elevation: 8, TextStyle style, double iconSize: 24.0, bool isDense: false })

Creates a dropdown button.

The items must have distinct values and if value isn't null it must be among them.

The elevation and iconSize arguments must not be null (they both have defaults, so do not need to be specified).

Source

DropdownButton({
  Key key,
  @required this.items,
  this.value,
  this.hint,
  @required this.onChanged,
  this.elevation: 8,
  this.style,
  this.iconSize: 24.0,
  this.isDense: false,
}) : super(key: key) {
  assert(items != null);
  assert(value == null ||
    items.where((DropdownMenuItem<T> item) => item.value == value).length == 1);
}