``` Scaffold( topBar = { WoofT...
# compose
h
Copy code
Scaffold(
        topBar = {
            WoofTopAppBar()
        }
    ) { it ->
        LazyColumn(contentPadding = it) {
            items(dogs) {
                DogItem(
                    dog = it,                   
                )
            }
        }
    }
without suppressing ‘`it`’ of
contentPadding
, if i want to use some
PaddingValue
for
contentPadding
, is there a way ?
s
What do you mean by suppressing? You are already applying the content padding, do you perhaps mean you want to add some more padding to it? If yes bring in this https://kotlinlang.slack.com/archives/CJLTWPH7S/p1678459793432549?thread_ts=1678447342.817139&cid=CJLTWPH7S and just add your paddings together that you pass to contentPadding
👍 1
h
by suppressing i mean using :
@SuppressLint("UnusedMaterial3ScaffoldPaddingParameter")
using this this at top of composable, I can easily do:
Copy code
Scaffold(
        topBar = {
            WoofTopAppBar()
        }
    ) {
        LazyColumn(contentPadding = PaddingValues(vertical = 80.dp)) {
            items(dogs) {
                DogItem(
                    dog = it,
                   
                )
            }
        }
    }
s
The lint exists for a reason, are you sure you don't want to apply the padding from the scaffold? Are you aware what this will change in your UI? If you don't use those padding values you're likely to experience other kinds of issues instead. What you most likely want here is
contentPadding = it + PaddingValues(80.dp)
or something like that. But I've no idea what you're trying to achieve so can't be sure.
h
I am just trying to do one thing in too many ways for learning purpose. I think it is a nice way to learn
👍 1