Skip to content

Instantly share code, notes, and snippets.

@lordcodes
Created February 25, 2020 20:19
Show Gist options
  • Save lordcodes/80c52cf1f03e38955834e999a414a891 to your computer and use it in GitHub Desktop.
Save lordcodes/80c52cf1f03e38955834e999a414a891 to your computer and use it in GitHub Desktop.
Code for the article: "Uploading a file with progress in Kotlin"
sealed class CountingRequestResult<ResultT> {
data class Progress<ResultT>(
val progressFraction: Double
) : CountingRequestResult<ResultT>()
data class Completed<ResultT>(
val result: ResultT
) : CountingRequestResult<ResultT>()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment