Skip to content

Commit

Permalink
Dynamic theme updates
Browse files Browse the repository at this point in the history
  • Loading branch information
T8RIN committed Apr 1, 2023
1 parent dc12c41 commit 56f4a58
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ fun DynamicTheme(
)
}

/**Composable representing ColorTuple object **/
@Composable
fun ColorTupleItem(
modifier: Modifier = Modifier,
Expand Down Expand Up @@ -345,6 +346,11 @@ fun Bitmap.extractPrimaryColor(default: Int = 0, blendWithVibrant: Boolean = tru
)
}

/** Class that represents App color scheme based on three main colors
* @param primary primary color
* @param secondary secondary color
* @param tertiary tertiary color
*/
data class ColorTuple(
val primary: Color,
val secondary: Color? = null,
Expand Down Expand Up @@ -522,4 +528,4 @@ private fun Scheme.toLightThemeColorScheme(
}

val LocalDynamicThemeState: ProvidableCompositionLocal<DynamicThemeState> =
compositionLocalOf { error("Not present") }
compositionLocalOf { error("DynamicThemeState not present") }

0 comments on commit 56f4a58

Please sign in to comment.