title: How to request permissions in Jetpack Compose?
body: <p>I have an app that needs to request permissions at run time.<br />
  I searched and couldn't find a solution on how to do it in Jetpack Compose.</p>
  <p>How can I request/check permissions at runtime from a <code>@Composable</code> function? (my functions are nested deep so I have no access to the activity instance)</p>
  <p>I would like to have something like:</p>
  <pre><code>@Composable()
  fun test() {
    val hasPermission = checkPermission(&quot;READ_CONTACTS&quot;)
    if (hasPermission)
      LoadData()
    else
      requestPermission(&quot;READ_CONTACTS&quot;)
  }
  </code></pre>