Sam Stone
12/24/2023, 9:26 PMAppTheme composable, but only want to expect it on android, and otherwise use the preset colors implementation.Wout Werkman
12/25/2023, 7:14 AMCheick Kante
12/28/2023, 7:53 PM@Composable
fun AppTheme(content: @Composable -> Unit )
// no material 3 here
you will call the below function as .. AppTheme { ..content/composables.. }
@Composable
fun AppThemeM3(content: @Composable -> Unit )
in your androidCode:
you will call the below function as .. AppThemeM3 { ..content/composables.. }Sam Stone
01/01/2024, 2:47 AMApp composable is the entry point to the app. If I didn’t include AppTheme in App, I would have to wrap the invocation in AppTheme on every platform except Android, and AppThemeM3 on Android. This is the same problem appearing differently. Maybe I could pass a function reference to App with a composable theme and provide AppTheme as a default value, though I don’t know if Compose supports that.