Should compose screen always start with a surface

71 Views Asked by At

I'm unsure if each screen should start with a surface after the composable theme. For example, a scaffold already includes a surface, and I suppose most screens will have a scaffold. I get mixed signals. There are samples using a surface with the background token as color, but if you do this and, for example, in one screen, you have a BottomSheetScaffold, that scaffold gets colored with the surface token and not the background, leading to different color constellations. At the other hand, in some docs, you can read you background token is legacy and should not be used anymore, but if you use the surface color for the background of each screen, then the brackground, the appbar, the bottombar, etc., all get the same color by default, so it's not clear what if the recommended practice as per Material Specs.

0

There are 0 best solutions below