This will let you grab a context from within a composable function
val context = +ambient(ContextAmbient)
, you don’t need to pass any parameters.
Andrew Kelly
11/07/2019, 10:44 AM
When I was shown this I was told that it would only return the
ApplicationContext
this may or may not be true now. Meaning that on configuration change you might not see new resources if you load them via the context. There are helper methods though for things like reading Strings, Drawables etc, so maybe use those instead if required.