Currently, the library has UI implemented as a plugin for RedMadRobot/debug-panel-android. It would be great to be able to use this UI separately from the debug-panel. For example, add it to own implementation of debug panel.
All we need to do is to provide API like this:
@Composable
fun KonfeatureConfigurationScreen(
konfeature: Konfeature,
settingInterceptor: KonfeatureSettingsInterceptor = /* retrieve the interceptor from the given Konfeature instance */
modifier: Modifier = Modifier,
)
interface KonfeatureSettingsInterceptor : Interceptor {
val valuesFlow: StateFlow<Map<String, Any>>
suspend fun setValue(key: String, value: Any)
suspend fun resetValue(key: String)
suspend fun resetAllValues()
}
Where KonfeatureSettingsInterceptor is the entity responsible for changing settings from UI and, probably, storing the changes somewhere.
Currently, the library has UI implemented as a plugin for RedMadRobot/debug-panel-android. It would be great to be able to use this UI separately from the debug-panel. For example, add it to own implementation of debug panel.
All we need to do is to provide API like this:
Where
KonfeatureSettingsInterceptoris the entity responsible for changing settings from UI and, probably, storing the changes somewhere.