showCommandMenuDialog function
Future<PluginCommandConfig?>
showCommandMenuDialog({
- required BuildContext context,
- required String title,
- required List<
PluginCommandConfig> commands,
Implementation
Future<PluginCommandConfig?> showCommandMenuDialog({
required BuildContext context,
required String title,
required List<PluginCommandConfig> commands,
}) => showOverlayDialog<PluginCommandConfig>(
context: context,
builder: (context, completer, entry) => CommandMenuDialog(
title: title,
commands: commands,
onSelect: (command) {
completer.complete(command);
entry?.remove();
},
onCancel: () {
completer.complete(null);
entry?.remove();
},
),
);