title: how to launch a coroutine inside a composable in Android Jetpack Compose
body: <p>I created a LazyColumn that is getting the items from the viewModel and every thing is working perfectly, But <strong>What I want is when a new Item is inserted to the lazy column I want the the background color of the new Item to be green for 2 seconds and then it turns back to white</strong> .
  And here is what I did to achieve that but the Item keeps being green:</p>
  <pre><code>@Composable
  fun SingleItem(item: Item) {
  val new = remember {
      mutableStateOf(true)
  }
  val color: MutableState&lt;Color&gt; = remember {
      if (new.value)
          mutableStateOf(Color(0xFFB9F6CA))
      else
          mutableStateOf(Color(0xFFFDFDFD))
  }
  Card(
      modifier = Modifier
          .padding(4.dp)
          .fillMaxWidth(),
      shape = RoundedCornerShape(8.dp),
      backgroundColor = color.value
  ) {
      GlobalScope.launch {
          delay(2000)
          new.value= !new.value
      }
      Column(
          modifier = Modifier
              .fillMaxWidth(),
          horizontalAlignment = Alignment.Start,
          verticalArrangement = Arrangement.SpaceBetween
      ) {
          Text(text = item.name, style = MaterialTheme.typography.h5)
          Text(text = &quot;${item.quantity}&quot;, style = MaterialTheme.typography.h6)
      }
  }
  </code></pre>
  <p><a href="https://i.stack.imgur.com/RJ2zn.png" rel="noreferrer">Here is a Screen shot of what I am talking about</a></p>