Junsu Park
11/05/2025, 1:11 AMScaffold pattern, similar to a primary/secondary structure I used in Flutter.
• primary (root): root layout (coordinator), contains main BottomNavBar.
• secondary (child): inside the primary scaffold.
in Flutter, setting primary: true on an AppBar or Scaffold seems to do much more than just manage padding. In Compose, it feels like I have to do all of this manually. is there any way to achieve this primary/secondary problem easily? or am I missing some key idea of compose?
thank you!Filip Wiesner
11/05/2025, 9:53 AMJunsu Park
11/06/2025, 2:51 AMFilip Wiesner
11/06/2025, 7:25 AMsystemBarsPadding() modifier.
System UI colors are a bit tricky. There used to be a semi-official library for that, but that's deprecated now with no alternative, as far as I know.
The auto-elevating app bar is there, but you have to do the wiring yourself. However, it's pretty easy to do. Here is the documentation.
Overall, I am in favor of components working more on their own and developers having to connect them. It makes everything more flexible IMO. But I see how it can be annoying coming from a system where everything is opinionated and done automatically.Junsu Park
11/06/2025, 7:41 AMFilip Wiesner
11/06/2025, 8:06 AMremember function. In the alpha versions of Compose, when you wanted a state value in composition, you could write var a by state { ... }. But later, it was deprecated in favor of mixing remember and mutableStateOf. It's now longer to write the same, but it should be clearer how it actually works. `remember`'s responsibility is to keep what's inside between compositions, and mutableStateOf is there to propagate the change where needed and trigger recompositions. Each thing has its own purpose, and you achieve what you want by combining them.