android-jetpack-compose 1个回答0投票 使用如下结构在可组合视图模型中获取和设置数据。 在视图模型中声明数据是 val screenModel = MutableStateFlow(DataClass()) fun onDataUpdated(data:DataClass) { screenModel.value = data } 然后在您的可组合项中获取和设置数据,如下所示 val viewModel: ViewModel...
注意,Jetpack Compose中的控件被定义成一个一个的可组合函数,官方称这些控件为Composable,翻译成中文是...
Jetpack compose for UI Compose Navigation Hilt for dependency Injection Room for storing complex data locally DataStore for shared preferences like app's launch state and language, etc. MacroBenchmark for measuring app performance. Baseline Profiles to optimize performance to fasten up the startup proc...