title: Any(better) approach to pass compose desktop's `onClick` through `callbackFow`?
body: <p>I was wondering if it is possible to pass <code>onClik</code> [handling <code>onClick</code>] through <code>callbackFlow</code> as I saw from this <a href="https://stackoverflow.com/questions/57899296/kotlin-coroutine-flow-example-for-android-button-click-event/57914394#57914394">this</a> post.
  I was having hard time implementing since the <code>onClick Callback</code> was inside parameter also <code>Button</code> is function so wasn`t able to implement extension function</p>
  <p>anyways  I tried something like</p>
  <pre class="lang-kotlin prettyprint-override"><code>
      lateinit var buttonListener :Flow&lt;Unit&gt;
  
  
  
      fun &lt;T &gt;offers(t: T) = callbackFlow {
          offer(t)
      awaitClose { null }
      }
  
      CoroutineScope(IO).launch {
          if(::buttonListener.itInitalized){
              buttonListener.collect {
                  println(&quot;it =&gt; Kotlin.Unit&quot;)
              }        
          }
      }
      MaterialTheme {
  
                    Button(
                      onClick = {
                          println(&quot;buttonClicked&quot;)
                          buttonListener = offers(Unit)
  
                      } //...
                  ) { /** designs */}
  
      }
  
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      
  </code></pre>
  <p>which is callable only 1 times on every runtime</p>
  <pre><code>buttonClicked                 &lt;--\ 
  Kotlin.Unit =&gt; Kotlin.Unit    &lt;--/\__first click
  buttonClicked
  buttonClicked
  buttonClicked
  </code></pre>
  <p>yet expecting someting like</p>
  <pre><code>buttonClicked
  Kotlin.Unit =&gt; Kotlin.Unit
  buttonClicked
  Kotlin.Unit =&gt; Kotlin.Unit
  buttonClicked
  Kotlin.Unit =&gt; Kotlin.Unit
  </code></pre>