Browse Source

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

* Widgets gallery: fix for mismatched @Composable annotation

* Widgets gallery: remove isSystemInDarkTheme expect function
pull/3409/head
Nikita Lipsky 1 year ago committed by GitHub
parent
commit
02caf437db
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  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.runtime.Composable
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.*
// 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