showActionSheet static method
Implementation
static showActionSheet(BuildContext context, List<AlertAction> actions) {
showCupertinoModalPopup(
context: context,
builder: (BuildContext context) {
return CupertinoActionSheet(
cancelButton: CupertinoActionSheetAction(
onPressed: () {
Navigator.pop(context);
},
child: Text(AlertView.defaultCancelTitle),
),
actions: actions
.map((e) => CupertinoActionSheetAction(
onPressed: () {
Navigator.of(context).pop();
e.onPressed();
},
child: Text(e.title),
))
.toList(),
);
},
);
}