Dec 12, 2022
Hi! Thanks for your comment. Yes, using an enum is a viable solution. I guess, it is a version of the second solution from the article, but for cases when the function parameter doesn't have it's own parameters, like parameterless TestText. But this solution, in my opinion, has the same disadvantages as the second solution from the article.
I encountered this problem when creating a custom design system: https://popovanton0.medium.com/building-a-modern-design-system-using-jetpack-compose-8bd8084e8b0c
But, unfortunately, I came up with this solution much later)