Grid Template Context
@ExperimentalCoroutinesApi
Content copied to clipboard
This context class enables to set the template properties for rows, columns and their corresponding automatic variants for dynamically added rows or columns (have a look at Auto placement documentation) in a flexible yet comfortable way.
This class exposes two variants of the repeat function in order so specify the amount of rows or columns of a grid layout. One is specialized for integer based amounts of repetition of row or column appearance rules, the other enables the usage of custom or predefined rules also included as properties of this context, like autoFill for example.
It offers also the minmax function in order to use this as parameter to repeat.
example calls:
// assuming both calls within some [GridTemplateContext]
columns { /* it == GridTemplateContext.() -> Unit */
repeat(9) { "9fr" }
repeat(autoFill) { "9fr" }
}
autoRows { /* it == GridTemplateContext.() -> Unit */
minmax("100px", auto)
}Content copied to clipboard