How to get Context in Jetpack Compose

前端 未结 7 1659
情歌与酒
情歌与酒 2021-02-19 07:35
fun createListItem(itemIndex: Int) {
Padding(left = 8.dp, right = 8.dp, top = 8.dp, bottom = 8.dp) {
    FlexRow(crossAxisAlignment = CrossAxisAlignment.Center) {
               


        
相关标签:
7条回答
  • 2021-02-19 08:00

    You can access to context with define ambientContext.

    Example:

    val context = ContextAmbient.current
    
    0 讨论(0)
提交回复
热议问题