showFluent2Menu<T> function
Future<T?>
showFluent2Menu<T>(
- BuildContext context, {
- required List<
Fluent2MenuItem< items,T> > - BuildContext? anchor,
- String? title,
- String? label,
Opens a Fluent2Menu of items under the control context belongs to (a
Builder round it) over the whole app; anchor widens the box it drops
from. Completes with the value chosen, or null when it is dismissed.
final picked = await showFluent2Menu<String>(context, items: const [Fluent2MenuItem('rename', 'Rename')]);
Implementation
Future<T?> showFluent2Menu<T>(
BuildContext context, {
required List<Fluent2MenuItem<T>> items,
BuildContext? anchor,
String? title,
String? label,
}) => Fluent2Menu.show<T>(
context,
items: items,
anchor: anchor,
title: title,
label: label,
);