ajilo297 / Flutter-Dotted-Border

A Flutter package to easily add dashed borders around widgets
https://pub.dev/packages/dotted_border
MIT License
295 stars 63 forks source link

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

Closed DeadlockOfDeath closed 2 months ago

DeadlockOfDeath commented 9 months ago

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?

ajilo297 commented 9 months ago

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

DeadlockOfDeath commented 9 months ago

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

ajilo297 commented 9 months ago

@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.

DeadlockOfDeath commented 9 months ago

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

DeadlockOfDeath commented 9 months ago

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

ajilo297 commented 2 months ago

Closed by #39