defaultContextMenuBuilder static method
Widget
defaultContextMenuBuilder(
)
Implementation
static Widget defaultContextMenuBuilder(BuildContext context, PanelState state) {
return PopupMenuButton<String>(
shape: RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(5))),
tooltip: "Context Menu",
child: Center(
child: Icon(Icons.more_vert, size: 19.0),
),
initialValue: state.widget.titles[state.tabController.index],
onSelected: (String value) {
state.tabController.animateTo(state.widget.titles.indexOf(value));
},
itemBuilder: (context) {
return state.widget.titles.map((String? title) {
return PopupMenuItem<String>(
height: 10.0,
// enabled: title != widget.titles[tabController.index],
value: title ?? "Panel",
child: Text(title ?? "Panel"),
);
}).toList();
},
);
}