@@ -3,6 +3,7 @@ package io.qonversion.nocodes
33import android.app.Application
44import android.content.Context
55import io.qonversion.nocodes.dto.LogLevel
6+ import io.qonversion.nocodes.dto.NoCodesTheme
67import io.qonversion.nocodes.interfaces.NoCodesDelegate
78import io.qonversion.nocodes.interfaces.PurchaseDelegate
89import io.qonversion.nocodes.interfaces.PurchaseDelegateWithCallbacks
@@ -32,6 +33,7 @@ class NoCodesConfig internal constructor(
3233 internal val purchaseDelegate : PurchaseDelegate ? ,
3334 internal val purchaseDelegateWithCallbacks : PurchaseDelegateWithCallbacks ? ,
3435 internal val locale : String? ,
36+ internal val theme : NoCodesTheme ,
3537) {
3638
3739 /* *
@@ -57,6 +59,7 @@ class NoCodesConfig internal constructor(
5759 private var logTag = DEFAULT_LOG_TAG
5860 private var customFallbackFileName: String? = null
5961 private var locale: String? = null
62+ private var theme: NoCodesTheme = NoCodesTheme .Auto
6063
6164 /* *
6265 * Provide a delegate to be notified about the no-code screens events.
@@ -171,6 +174,18 @@ class NoCodesConfig internal constructor(
171174 this .locale = locale
172175 }
173176
177+ /* *
178+ * Set the theme mode for No-Code screens.
179+ * Controls how screens adapt to light/dark themes.
180+ *
181+ * @param theme the desired theme mode. Use [NoCodesTheme.Auto] to follow device settings,
182+ * [NoCodesTheme.Light] to force light theme, or [NoCodesTheme.Dark] to force dark theme.
183+ * @return builder instance for chain calls.
184+ */
185+ fun setTheme (theme : NoCodesTheme ): Builder = apply {
186+ this .theme = theme
187+ }
188+
174189 /* *
175190 * Generate [NoCodesConfig] instance with all the provided configurations.
176191 * This method also validates some of the provided data.
@@ -197,6 +212,7 @@ class NoCodesConfig internal constructor(
197212 purchaseDelegate,
198213 purchaseDelegateWithCallbacks,
199214 locale,
215+ theme,
200216 )
201217 }
202218 }
0 commit comments