title: Jetpack compose popup menu
body: <p>I am trying to rewrite my project UI using Jetpack compose. Any idea to add popup menu using jetpack compose in android?
  <a href="https://i.stack.imgur.com/21im2m.png" rel="noreferrer">like this one</a></p>
  
  <p>I tried to implement it using Stack() layout but the results are not up to the mark.</p>
  
  <pre><code>@Composable
  fun LiveDataComponentList(productList: List&lt;Product&gt;) {
      AdapterList(data = productList) { product -&gt;
          Stack() {
              Clickable(onClick = { PopupState.toggleOwner(product) }) {
                  Card(...) {...}
  
              if (PopupState.owner == product) {
                  Surface(color = Color.Gray,modifier = Modifier.gravity(Alignment.TopEnd) + Modifier.padding(12.dp)) {
                      Column() {
                          Text("menu 1")
                          Text("menu 2")
                          Text("menu 3")
                          Text("menu 4")
                          Text("menu 5")
                      }
                  }
              }
          }
      }
  }
  </code></pre>
  
  <p>and PopupState is</p>
  
  <pre><code>@Model
  object PopupState
  {
      var owner:Product?=null
      fun toggleOwner(item:Product)
      {
          if(owner==item)
              owner=null
          else
              owner=item
      }
  }
  </code></pre>
  
  <p>result is</p>
  
  <p><a href="https://i.stack.imgur.com/FZ0cJ.png" rel="noreferrer">screenshot</a></p>