Flutter-Dotted-Border icon indicating copy to clipboard operation
Flutter-Dotted-Border copied to clipboard

Border being drawn before child widget causing it to disappear beneath it when adding padding to borderPadding property

Open allisnulll opened this issue 2 years ago • 5 comments

I was using your package, and I wanted to add a border around a TextField. I was going for something like this where the dashed lines are inside the child widget: TextField I figured out you can use the borderPadding property to control this, but when I add the padding the border goes beneath the child widget and disappears. This can be easily fixed if you just swap the two child widgets of the stack, I tested it already and it works. swap Is there a reason why it is like this?

allisnulll avatar Nov 28 '23 21:11 allisnulll

@DeadlockOfDeath That's a good idea actually. I will consider doing it in the next iteration.

ajilo297 avatar Nov 29 '23 04:11 ajilo297

Thanks for looking at this. I am a beginner at Flutter and looking at your CustomPainter source code is educational for me.

allisnulll avatar Nov 29 '23 06:11 allisnulll

@DeadlockOfDeath Let's keep this issue open until I can make the change. In the meantime, if you can create a PR, that would help as well.

ajilo297 avatar Nov 29 '23 06:11 ajilo297

I don't really know how GitHub works to be honest but I'll try.

allisnulll avatar Nov 29 '23 08:11 allisnulll

I just made a pull request, this is my first time. Did I do it right?

allisnulll avatar Nov 29 '23 08:11 allisnulll

Closed by #39

ajilo297 avatar Jun 19 '24 18:06 ajilo297