Is there a list of the various LocalWhatever thing...
# compose
t
Is there a list of the various LocalWhatever things? LocalContentColor, LocalTextStyle, LocalRippleTheme, LocalConfiguration, etc? Seems like there are quite a few of them, and I'm absently stumbling on them, but there's actually a bit of state to be accessed through the whole set me thinks.
z
There isn’t a list of all the composition locals. This would be hard to do since anyone can define a composition local. Even in compose itself, there are locals defined in many different modules.
t
Can they queried dynamically?
IOW, is there an expression one can evaluate at a leaf composition that will return all of the currently "provided" keys?
e
You can also open your IDE, navigate to
staticCompositionLocalOf
(or
compositionLocalOf
) and Cmd+Click on it. Should list all the available locals created by calling any of those functions. Not a curated list but might be good enough.
You can also do a code-wide search for both of those within cs.android.com