pickAction static method
Future<XAction?>
pickAction(})
Implementation
static Future<XAction?> pickAction(
List<XAction> items, {
String? title,
XAction? selected,
Widget Function(XAction)? onItemView,
Widget? Function(XAction)? onTitle,
Widget? Function(XAction)? onSubtitle,
Widget? Function(XAction)? onLeading,
Widget? Function(XAction)? onTrailing,
List<Widget>? aboveWidgets,
List<Widget>? belowWidgets,
DialogWidth? width,
bool withOKCancel = false,
}) async {
XAction? sel = selected ?? items.firstOr((e) => e.checked);
XAction? ac = await pickValue(
items,
title: title,
selected: sel,
onItemView: onItemView,
onTitle: onTitle ?? (a) => a.titleWidget,
onLeading: onLeading ?? (a) => a.iconWidget,
onSubtitle: onSubtitle,
onTrailing: onTrailing,
aboveWidgets: aboveWidgets,
belowWidgets: belowWidgets,
width: width,
withOKCancel: withOKCancel,
);
ac?.onclick();
return ac;
}