- i want to fill the image to max size of page and fill the edges below the appbar.
- i can fill the image to full background without using scaffold but in this case i need to use scaffold.
- the screenshot is attached with the question for better understanding
- u can check it by tapping on the link
enter image description here
@Composable
fun ScaffoldBackground() {
Scaffold(
topBar = {
TopAppBar(
modifier = Modifier
.fillMaxHeight(0.2f)
.clip(
shape = RoundedCornerShape(bottomEnd = 30.dp, bottomStart = 30.dp)
),
// Provide Title
title = {
Text(
text = "Dashboard",
)
}
)
},
) {
Box(
modifier = Modifier
.fillMaxSize()
) {
Image(
modifier = Modifier
.fillMaxSize(),
painter = painterResource(R.drawable.ic_launcher_background),
contentDescription = "background_image",
contentScale = ContentScale.FillBounds
)
}
}
}
the image cant fill the the edges of app bar