How can I use predefined UI portions as scaffold parameters without getting this warning?
> The expression is unused
b
Brett Best
09/13/2020, 7:09 AM
Try either:
topAppBar = myAppBar
or
topAppBar = { myAppBar() }
❤️ 1
👆 1
@Mehdi Haghgoo if that doesn’t work can you paste the declaration of
myAppBar
m
Mehdi Haghgoo
09/13/2020, 8:27 AM
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