PopupMenuButton({Key key, @required PopupMenuItemBuilder<T> itemBuilder, T initialValue, PopupMenuItemSelected<T> onSelected, String tooltip: 'Show menu', int elevation: 8, EdgeInsets padding: const EdgeInsets.all(8.0), Widget child })

Creates a button that shows a popup menu.

The itemBuilder argument must not be null.

Source

PopupMenuButton({
  Key key,
  @required this.itemBuilder,
  this.initialValue,
  this.onSelected,
  this.tooltip: 'Show menu',
  this.elevation: 8,
  this.padding: const EdgeInsets.all(8.0),
  this.child
}) : super(key: key) {
  assert(itemBuilder != null);
}