FlutterSwitch icon indicating copy to clipboard operation
FlutterSwitch copied to clipboard

Reduce padding between toggle and edges to 0

Open Perondas opened this issue 3 years ago • 2 comments

I am trying to create a switch like in this image: image

However, I cannot find a way to reduce the distance between the toggle and the edges to 0. It ends up looking like this: image

It would be nice if there was a setting that allows to remove this little bit of padding.

I have already looked at the code and by subtracting 9 from the Container width on line 382 I get the following: image

This is certainly better, but the 9 is hardcoded for my specific toggle size.

Perondas avatar Apr 11 '22 10:04 Perondas

Hei Perondas, you can set padding:0 to get the desired output

sunilhari9 avatar Mar 13 '23 11:03 sunilhari9

It solved the issue. Maybe we need to add this info to documentation. Thanks.

hcakil avatar Jun 07 '23 11:06 hcakil