Since Compose 1.2.0 it’s required to use padding parameter, passed into Scaffold
content
composable. You should apply it to the topmost container/view in content
:
content = { padding ->
Column(
modifier = Modifier
.padding(padding)
// ...
This is done to prevent layout problems, for example, when the scaffold has a bottom bar, without the use of this padding part of your view will be under the bar.
You can always suppress it with @SuppressLint("UnusedMaterialScaffoldPaddingParameter")
, but I would recommend doing this only when you know exactly what you are doing.