im using flutter_slidable: ^1.2.0 package
how do i adjust the width of the SlidableAction ?
and is it able to edit the radius? with BorderRadius.circular maybe
one more if i press the delete button i want to run dismiss animation function how ?

here is the full code
for (var i = 0; i < c.noteList.length; i++)
Slidable(
key: ValueKey(
c.noteList[i]['id'],
),
startActionPane: ActionPane(
motion: StretchMotion(),
dismissible: DismissiblePane(
onDismissed: () {
handleDeleteSet(
c.noteList[i]['id'],
);
},
),
children: [
SlidableAction(
onPressed: (context) {},
backgroundColor: Colors.red,
foregroundColor: Colors.white,
icon: Icons.delete,
label: 'Delete',
),
],
),
child: NoteTile(
index: i + 1,
item: c.noteList[i],
deleteItem: (id) {
handleDeleteSet(id);
},
onSaveData: () {
saveData();
},
),
),
For editing the width of the slidable area, you should use the extentRatio parameter, which accepts a double value above 0 and below 1:
ActionPane(
extentRatio: 0.7,
motion: const ScrollMotion(),
children: []
),
For the radius, just use a Container and decoration parameter:
ActionPane(
extentRatio: 0.7,
motion: const ScrollMotion(),
children: [
Container(
height: 180,
width: width(context, 60),
decoration: BoxDecoration(
color: Colors.transparent,
borderRadius: const BorderRadius.only(
topLeft: Radius.circular(10),
bottomLeft: Radius.circular(10),
),
),
)
]
)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With