Jan Skrasek01/26/2022, 10:31 AM
- seems to have mutability issues and I didn't found any copy/clone method. •
- for custom rendering icon is too benevolent for me •
@Composable () -> Unit
- is what I'm ended up. Is it the correct solution?
@Composable () -> Painter
Halil Ozercan01/26/2022, 12:16 PM
Zoltan Demant01/26/2022, 1:05 PM
support). We did this by declaring a sealed interface "IconResource"; a subclass of it is an enum with pointers to things like
etc. It has worked really well, and kept our icons streamlined across a pretty large project (~200 modules); the check icon is always rounded, and we can easily switch that out if need be. We thought we would rely on
for something, but we havent yet. Adding it in would be as easy as declaring another subclass of the sealed interface though. In the icon composable we just derive the icon contents from the subclass specified!