Browse Source

Widgets gallery: fix for mismatched @Composable annotation (#3402)

* Widgets gallery: fix for mismatched @Composable annotation

* Widgets gallery: remove isSystemInDarkTheme expect function
release/1.4.2
Nikita Lipsky 1 year ago committed by Igor Demin
parent
commit
be7e78cf79
  1. 8
      examples/widgets-gallery/shared/src/androidMain/kotlin/org/jetbrains/compose/demo/widgets/platform/System.kt
  2. 3
      examples/widgets-gallery/shared/src/commonMain/kotlin/org/jetbrains/compose/demo/widgets/platform/System.kt
  3. 2
      examples/widgets-gallery/shared/src/commonMain/kotlin/org/jetbrains/compose/demo/widgets/theme/Theme.kt
  4. 7
      examples/widgets-gallery/shared/src/iosMain/kotlin/org/jetbrains/compose/demo/widgets/platform/System.kt

8
examples/widgets-gallery/shared/src/androidMain/kotlin/org/jetbrains/compose/demo/widgets/platform/System.kt

@ -1,8 +0,0 @@
package org.jetbrains.compose.demo.widgets.platform
import androidx.compose.runtime.Composable
import androidx.compose.foundation.isSystemInDarkTheme as androidSystemIsInDarkTheme
@Composable
actual fun isSystemInDarkTheme(): Boolean =
androidSystemIsInDarkTheme()

3
examples/widgets-gallery/shared/src/commonMain/kotlin/org/jetbrains/compose/demo/widgets/platform/System.kt

@ -1,3 +0,0 @@
package org.jetbrains.compose.demo.widgets.platform
expect fun isSystemInDarkTheme(): Boolean

2
examples/widgets-gallery/shared/src/commonMain/kotlin/org/jetbrains/compose/demo/widgets/theme/Theme.kt

@ -5,7 +5,7 @@ import androidx.compose.material.darkColors
import androidx.compose.material.lightColors import androidx.compose.material.lightColors
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable
import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.Color
import org.jetbrains.compose.demo.widgets.platform.isSystemInDarkTheme import androidx.compose.foundation.isSystemInDarkTheme
import org.jetbrains.compose.demo.widgets.theme.ColorPallet.* import org.jetbrains.compose.demo.widgets.theme.ColorPallet.*
// dark palettes // dark palettes

7
examples/widgets-gallery/shared/src/iosMain/kotlin/org/jetbrains/compose/demo/widgets/platform/System.kt

@ -1,7 +0,0 @@
package org.jetbrains.compose.demo.widgets.platform
import androidx.compose.runtime.Composable
import org.jetbrains.skiko.SystemTheme
@Composable
actual fun isSystemInDarkTheme(): Boolean = org.jetbrains.skiko.currentSystemTheme == SystemTheme.DARK
Loading…
Cancel
Save