I`m new to compose and am trying to use an Image() composable with this specifics:

The Image needs to have more height and width than it`s parent but from a fixed offset (the green dot).
How can I achieve this design with jetpack compose?
Let's assume that your Sidebar is a Column, then the code would look like this:
Sidebar() {
Column() {
TopSidebar() // top part of sidebar, but not fillMaxHeight
Image(
modifier = Modifier
.wrapContentSize(unbounded = true, align = Alignment.TopStart),
... rest of parameters
)
}
}
The key things are unbounded = true and align. TopStart is your case
I wrote more about it with examples here on Medium
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With