Please enable JavaScript.
Coggle requires JavaScript to display documents.
COMPOSE MODIFIERS - Coggle Diagram
COMPOSE MODIFIERS
CONSTRAINTS AND MODIFIER ORDER
https://www.youtube.com/watch?v=OeC5jMV342A
LAYOUT PHASE
NODES NO CHILDREN
LEAF NODE
wrapContentSize
CUSTOM MODIFIERS
OWN MODIFIER
Modifier.Node
MOST PERFORMANT WAY
composed {} :red_cross:
Order of modifiers matters
modifier elements that are added first will be applied first.
padding
Modifier.padding() in Jetpack Compose acts as padding or margin depending on order.
Modifier.padding(10.dp).size(200.dp) adds space before setting size you have a Composable with 200.dp size
Modifier.size(200.dp).padding(10.dp) adds padding which you have 180.dp width and height after setting 10.dp padding on each side.
BUILD-IN MODIFIERS
.requiredSize
offset
Scope safety in Compose
.weight
ONLY AVAILABLE ROWSCOPE AND COLUMNSCOIPE
Extracting and reusing unscoped modifiers
EXTRACTING AND REUSING MODIFIERS
FURTHER CHAINING OF EXTRACTED MODIFIERS
.then()
REF
LIST OF MODIFIERS
:star: