sorry, in the above code, block is non-null, but w...
# getting-started
j
sorry, in the above code, block is non-null, but when I use
addparagraph("") it requires the {}
is there a way around that?
y
have a default value like so:
Copy code
inline fun Document.addParagraph(title: String, block: Paragraph.() -> Unit = {}) {
    add(Paragraph(title).apply(block))
}
j
thank you, that's simple enough