gts13
03/11/2024, 8:00 PMText . The setting is stored in DataStore.
Only in certain screens and at specific places the Text must change based on the settings.
So imagine we wrap this Text in a composable named DynamicText .
The DynamicText can be found in ScreenA, ScreenB and ScreenD.
One way I assume to achieve this is to observe the setting in the viewmodels of those screens and update DynamicText.
However is there any other way to achieve this? I imagine something like a singleton class "Observer" that holds the value of the setting and we can somehow pass it to DynamicText , is that possible?
Or any other way?Stylianos Gakis
03/11/2024, 9:05 PMgts13
03/11/2024, 10:10 PMStylianos Gakis
03/11/2024, 10:15 PM