How can I use predefined UI portions as scaffold p...
# compose
m
How can I use predefined UI portions as scaffold parameters without getting this warning? > The expression is unused
b
Try either:
topAppBar = myAppBar
or
topAppBar = { myAppBar() }
❤️ 1
👆 1
@Mehdi Haghgoo if that doesn’t work can you paste the declaration of
myAppBar
m
Thanks @Brett Best. The problem was I was assigning the definition of a composable to a variable. Instead it should have been a composable to be called when I needed it. As you said, something like
{MyAppBar()}
should be used as the value of
topAppBar
parameter.