[慢讯] 斯世已无对,寰宇独称雄!Vitality夺冠布达佩斯Major
This commit is contained in:
@@ -5,6 +5,7 @@ import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.foundation.isSystemInDarkTheme
|
||||
|
||||
@OptIn(ExperimentalMaterial3ExpressiveApi::class)
|
||||
@Composable
|
||||
fun AppTheme(
|
||||
darkTheme: Boolean = isSystemInDarkTheme(),
|
||||
@@ -12,7 +13,7 @@ fun AppTheme(
|
||||
content: @Composable () -> Unit
|
||||
) {
|
||||
val context = LocalContext.current
|
||||
|
||||
val motionScheme = MotionScheme.expressive()
|
||||
val colorScheme = when {
|
||||
dynamicColor && android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.S ->
|
||||
if (darkTheme) dynamicDarkColorScheme(context)
|
||||
@@ -22,9 +23,10 @@ fun AppTheme(
|
||||
else -> lightColorScheme()
|
||||
}
|
||||
|
||||
MaterialTheme(
|
||||
MaterialExpressiveTheme(
|
||||
colorScheme = colorScheme,
|
||||
typography = AppTypography,
|
||||
motionScheme = motionScheme,
|
||||
shapes = AppShapes,
|
||||
content = content
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user