Draw a horizontal line in a widget

Hi,

I was wondering what is the easiest way to draw a horizontal line in a widget.

I know I can do these:

But is there any easier way to add a simple line in order to separate visually two parts of the same widget?

Thanks,
Patryk

How about a stack with a height of 1 with a background color?

const w = new ListWidget()

w.addSpacer()

let hline = w.addStack()
hline.size = new Size(0, 1)
hline.backgroundColor = Color.red()
hline.addSpacer()

w.addSpacer()

await w.presentMedium()

Perfect. Thank you very much!

EDIT: I only had to change: new Size(0, 1) to: new Size(100, 1) in your example to make it visible in my widget.