Depending on number of entries in List distinctEmnen, I would like to show variable number of menu-choices. Is it possible to achieve something like this?
CupertinoActionSheet(
title: Text( tjo),
actions: [
CupertinoActionSheetAction(
child: Text( distinctEmnen[0]),
Navigator.of(context).pushNamed(distinctEmnen[0]);
}),
CupertinoActionSheetAction(
child: Text( distinctEmnen[1]),
onPressed: () {
Navigator.of(context).pushNamed(distinctEmnen[1]);
}),
CupertinoActionSheetAction(
child: Text( distinctEmnen[n...]),
onPressed: () {
Navigator.of(context).pushNamed(distinctEmnen[n...]);
}),
],
cancelButton: CupertinoActionSheetAction(
child: Text('Cancel'),
onPressed: () => Navigator.of(context).pop(),
),
),
