Zoltan Demant02/07/2022, 7:37 AM
due to the state changing quite frequently, and a lot of composables depending on that state. Unfortunately its not possible to mark a function variable
(and I can understand why). Ive tried creating a wrapper class which is
, but my composable functions eventually accept the wrapped value and therefore lose out on the fact that its immutable. Im not able to refactor my code to accept the wrapper class (without a major headache, there are 758 cases like this). Due to the sheer amount of classes that would be marked immutable, Id very much prefer to not mark each individual one (or subclass a marked interface). They are always immutable.
Is there another way?
@Immutable interface Screen