Skip to content

Commit

Permalink
add parameters to remember call (#146)
Browse files Browse the repository at this point in the history
This fixes the theme not recomposing if you don't use the `DynamicMaterialThemeState` parameter and instead use the individual parameters. Fixes #145
  • Loading branch information
jordond committed May 15, 2024
1 parent 962fbdf commit 6ebb5f9
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ public fun rememberDynamicMaterialThemeState(
modifyColorScheme: (DynamicMaterialThemeState.(ColorScheme) -> ColorScheme)? = null,
): DynamicMaterialThemeState {
return rememberSaveable(
seedColor,
isDark,
style,
contrastLevel,
extendedFidelity,
modifyColorScheme,
saver = DynamicMaterialThemeState.Saver(modifyColorScheme),
) {
DynamicMaterialThemeState(
Expand Down

0 comments on commit 6ebb5f9

Please sign in to comment.