show method
Display the popup menu.
Implementation
PopupMenuButton<dynamic> show(
StateMVC state, {
String? applicationName,
Widget? applicationIcon,
String? applicationLegalese,
List<Widget>? children,
bool useRootNavigator = true,
Menu? menu,
}) {
_state = state;
_menu = menu;
_applicationName = applicationName;
_applicationVersion = 'version: ${App.version} build: ${App.buildNumber}';
_applicationIcon = applicationIcon;
_applicationLegalese = applicationLegalese;
_children = children;
var menuItems = <PopupMenuEntry<dynamic>>[
// PopupMenuItem<dynamic>(value: 'Color', child: I10n.t('Colour Theme')),
PopupMenuItem<dynamic>(value: 'About', child: L10n.t('About'))
];
if (_menu != null) {
final temp = <PopupMenuEntry<dynamic>>[
..._menu!.menuItems(),
const PopupMenuDivider(),
...menuItems
];
menuItems = temp;
if (_menu!.tailItems.isNotEmpty) {
menuItems.add(const PopupMenuDivider());
menuItems.addAll(_menu!.tailItems);
}
}
return PopupMenuButton<dynamic>(
onSelected: _showMenuSelection,
itemBuilder: (BuildContext context) => menuItems,
);
}