How do I open a popup menu from a second widget?
final button = new PopupMenuButton(
itemBuilder: (_) => >[
I found a solution to your question. You can provide a child to PopupMenuButton which can be any Widget including a ListTile (see code below). Only problem is that the PopupMenu opens on the left side of the ListTile.
final popupMenu = new PopupMenuButton(
child: new ListTile(
title: new Text('Doge or lion?'),
trailing: const Icon(Icons.more_vert),
),
itemBuilder: (_) => >[
new PopupMenuItem(
child: new Text('Doge'), value: 'Doge'),
new PopupMenuItem(
child: new Text('Lion'), value: 'Lion'),
],
onSelected: _doSomething,
)