Steps of CompositionLocal

  1. Define a class for JetpackCompose to use val DependencyName = staticCompositionLocalOf<InterfaceOfDependency?> { null }
  2. When initializing the JetpackCompose view: CompositionLocalProvider(DependencyName provides objectForThatDependency { JetpackComposeView(...) }
  3. Use it in any @Composable function in that scope: DependencyName.current?