@Composable fun composeRunIfWallpaperCardColorsAreAvailable( run: @Composable (cardColorLight: Color, cardColorDark: Color) -> Unit, ) { if (currentWallpaper.cardColorLight != null && currentWallpaper.cardColorDark != null) { run(Color(currentWallpaper.cardColorLight), Color(currentWallpaper.cardColorDark)) } }
Run the Composable [run] block only if the current wallpaper's card colors are available.