flutter_slidable icon indicating copy to clipboard operation
flutter_slidable copied to clipboard

SlidableAction height - Padding to background of SlidableAction

Open hlynurl opened this issue 2 years ago • 6 comments

Using the latest version flutter_slidable: ^2.0.0 I am unable to add padding to the background of the slidable. I was able to do this in version ^0.6.0

I am updating the package and this is what I have image

This is what I would like to have image

I am unable to add padding so that the background height is affected giving me the wanted result.

hlynurl avatar Mar 26 '23 12:03 hlynurl

I am dealing with the same issue.

nickolasdeluca avatar Mar 26 '23 20:03 nickolasdeluca

can use Stack, example:

image

xiayuanquan avatar Mar 28 '23 05:03 xiayuanquan

After some deeper testing I found out that SlidableAction was not really the culprit of the problem. I found out that Cards have a margin property which is not set to 0 by default, that caused the difference in size of both widgets. I set the margin to 2.0 and now both widgets have the same size.

But I also believe the margin property would be a nice addition to SlidableActions. I was working on a fork to add height control to SlidableActions but I'll revert my changes and try to implement margin to the OutlinedButton of the SlidableAction, to work similar to the Cards.

nickolasdeluca avatar Mar 28 '23 11:03 nickolasdeluca

Are there any updates on this?

milindgoel15 avatar Apr 16 '23 17:04 milindgoel15

I have opened a PR to "fix" this "issue". Feel free to endorse it if you want to.

PR #412.

nickolasdeluca avatar Apr 16 '23 17:04 nickolasdeluca

Awesome, just need to wait for this pr to get merged then ig

milindgoel15 avatar Apr 16 '23 17:04 milindgoel15