showPickActions static method
Future<PickerActionOptions?>
showPickActions(
- BuildContext context,
- List<
PickerActionOptions> actions
show pick actions
Implementation
static Future<PickerActionOptions?> showPickActions(
BuildContext context, List<PickerActionOptions> actions) async {
if (actions.isEmpty) return null;
PickerActionOptions? action;
final effectiveActions =
actions.where((e) => e.action != PickerAction.cancel);
if (effectiveActions.length == 1) {
action = effectiveActions.first;
} else {
action = await showCupertinoModalPopup<PickerActionOptions?>(
context: context,
builder: (BuildContext context) => actionsBuilder(context, actions));
}
return action;
}