https://kotlinlang.org logo
Title
u

user

07/11/2022, 5:51 AM
How to convert custom callback to coroutine I am using Stripe library which provides me with custom callback functionality. I want a custom callback convert to Kotlin coroutine Here is the code override fun retrievePaymentIntent(clientSecret: String): Flow = flow{ emit(Resource.Loading()) Terminal.getInstance().retrievePaymentIntent(clientSecret, object : PaymentIntentCallback { override fun onFailure(e: TerminalException) {} override fun onSuccess(paymentIntent:...