mirror of
https://github.com/BetterAndroid/FlexiUI.git
synced 2025-09-07 19:14:12 +08:00
feat: add determine of dynamic colors
This commit is contained in:
@@ -29,6 +29,10 @@ import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
import com.highcapable.betterandroid.ui.extension.component.feature.SystemColors
|
||||
|
||||
@Composable
|
||||
@ReadOnlyComposable
|
||||
actual fun isDynamicColorsAvailable() = SystemColors.isAvailable
|
||||
|
||||
internal actual val DynamicLightColors
|
||||
@Composable
|
||||
@ReadOnlyComposable
|
||||
|
@@ -367,6 +367,10 @@ private val BlueBlackColors = Colors(
|
||||
isLight = false
|
||||
)
|
||||
|
||||
@Composable
|
||||
@ReadOnlyComposable
|
||||
expect fun isDynamicColorsAvailable(): Boolean
|
||||
|
||||
@Composable
|
||||
@ReadOnlyComposable
|
||||
fun dynamicColors(darkMode: Boolean = false, blackDarkMode: Boolean = false) = when {
|
||||
|
@@ -23,8 +23,15 @@
|
||||
|
||||
package com.highcapable.flexiui
|
||||
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.ReadOnlyComposable
|
||||
|
||||
internal actual val DynamicLightColors = DefaultLightColors
|
||||
|
||||
internal actual val DynamicDarkColors = DefaultDarkColors
|
||||
|
||||
internal actual val DynamicBlackColors = DefaultBlackColors
|
||||
internal actual val DynamicBlackColors = DefaultBlackColors
|
||||
|
||||
@Composable
|
||||
@ReadOnlyComposable
|
||||
actual fun isDynamicColorsAvailable() = false
|
@@ -23,8 +23,15 @@
|
||||
|
||||
package com.highcapable.flexiui
|
||||
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.ReadOnlyComposable
|
||||
|
||||
internal actual val DynamicLightColors = DefaultLightColors
|
||||
|
||||
internal actual val DynamicDarkColors = DefaultDarkColors
|
||||
|
||||
internal actual val DynamicBlackColors = DefaultBlackColors
|
||||
internal actual val DynamicBlackColors = DefaultBlackColors
|
||||
|
||||
@Composable
|
||||
@ReadOnlyComposable
|
||||
actual fun isDynamicColorsAvailable() = false
|
Reference in New Issue
Block a user