Manuel Lorenzo
11/25/2024, 6:29 PMContext via constructor for example to the androidMain but you don’t need it in iosMain? Because you can’t do something like
// commonMain expect fun createThemePreferences(): ThemePreferences
// androidMain actual fun createThemePreferences(context: Context): ThemePreferences { // Has no corresponding expected declaration
return ThemePreferencesImpl(context)
}escodro
11/25/2024, 6:34 PMexpect the function directly but an interface. Then, I could inject Context into the actual class implementation and not need this information in the function itself.Mathias DL
11/25/2024, 6:50 PMManuel Lorenzo
11/25/2024, 7:15 PMManuel Lorenzo
11/26/2024, 9:55 AMKoinContext inside my main composable. I'm also trying to do this to build a KMP library, not an app