CustomActionPane function
Implementation
ActionPane CustomActionPane({required String name, required Function onDelete}) {
return ActionPane(
motion: const ScrollMotion(),
children: [
SlidableAction(
flex: 1,
onPressed: (_) {
onDelete();
},
backgroundColor: Colors.red,
foregroundColor: Colors.white,
icon: Icons.delete,
label: name,
// label: S.of(context).delete,
),
],
);
}