attribute builder now may skip nullable values

This commit is contained in:
2022-02-09 01:26:33 +06:00
parent ca8f927304
commit 1f8298f626
2 changed files with 11 additions and 4 deletions

View File

@@ -24,9 +24,10 @@ class UIKitAttributeValueBuilder {
fun AttrsBuilder<*>.buildAndAddAttribute(
attributeName: String,
skipNullValues: Boolean = true,
block: AttributeBuilder.() -> Unit
) {
buildAttribute(attributeName, block).let {
buildAttribute(attributeName, skipNullValues, block).let {
attr(it.first, it.second)
}
}