Created
February 27, 2019 11:39
-
-
Save pavlospt/48ce7c0970e76681d33383359b23cc4f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
suspend fun <Response> Task<Response>.suspended(): Response = suspendCoroutine { continuation -> | |
addOnSuccessListener { continuation.resume(it) } | |
addOnFailureListener { continuation.resumeWithException(it) } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment