title: callbackFlow not returning anything android kotlin
body: <p>I want to implement firebase realtime database with coroutines, so I need to use flow because firebase just accept callbacks. the problem is the .collect{} block never gets executed
  here is my code</p>
  
  <pre><code>   @ExperimentalCoroutinesApi
  override suspend fun getProduct(barcode: String): ProductItem? {
      return withContext(Dispatchers.Default) {
          println("Hi")
          var item: ProductItem? = null
          productFlow(barcode).collect {
          //this never gets called
              print("Getting product")
              item = it
          }
          println("Ending product request ${item?.name}")
          Log.i("GetProduct",item?.name)
          item
      }
  }
  @ExperimentalCoroutinesApi
  private fun productFlow(barcode: String): Flow&lt;ProductItem?&gt; = callbackFlow {
      val database = FirebaseDatabase.getInstance()
      val productRef = database.getReference("products/$barcode")
      val callback = object : ValueEventListener {
          override fun onDataChange(dataSnapshot: DataSnapshot) {
              for(snapshot in dataSnapshot.children){
  
                  Log.i("Source", snapshot.value.toString())
              }
              val product = dataSnapshot.getValue(ProductItem::class.java)
              Log.i("Source",product?.name) //everything is good until here
  
              sendBlocking(dataSnapshot.getValue(ProductItem::class.java)) //after this i dont get anything on the collect{} block
          }
  
          override fun onCancelled(databaseError: DatabaseError) {
              println("cancelling")
              sendBlocking(null)
          }
      }
      try {
          productRef.addListenerForSingleValueEvent(callback)
      } catch (e: FirebaseException) {
          println("Firebase exception")
          sendBlocking(null)
      }
      awaitClose{
          println("Closing")
          productRef.removeEventListener(callback)
      }
  }
  </code></pre>