Mark
12/19/2024, 4:12 AMSystemUiTools interface (and implemented with AndroidSystemUiTools(Context) implementation (Context provided using LocalContext.current) used throughout the compose code. How to decide whether to make it available via staticCompositionLocalOf() (i.e. LocalSystemUiTools.current) vs.
@Composable
fun rememberSystemUiTools(): SystemUiTools {
val context = LocalContext.current
return remember(context) {
AndroidSystemUiTools(context)
}
}
Note: this is an Android app for now, but I’m refactoring with a look to keeping Android-specific parts separate.Mark
12/19/2024, 4:16 AMCompositionLocalProvider solution allows proper testing?