当菜单隐藏式,点击或调用onSelected时显示一个弹出式菜单列表
PopupMenuButton({
Key key,
@required this.itemBuilder,
this.initialValue,
this.onSelected,
this.onCanceled,
this.tooltip,
this.elevation = 8.0,
this.padding = const EdgeInsets.all(8.0),
this.child,
this.icon,
this.offset = Offset.zero,
})itemBuilder:<PopupMenuItem<String>>[],initialValue: 'value',onSelected:(String action) {}onCanceled: () {}tooltip: "长按提示",elevation:8.0,child: Text("abc"),icon: Image(image: AssetImage("lib/assets/tabbar/search.png"),),