Skip to content

Instantly share code, notes, and snippets.

@EmmanuelGuther
Created February 2, 2021 07:14
Show Gist options
  • Save EmmanuelGuther/d2b540da3532dc90b679f7f7e3bed730 to your computer and use it in GitHub Desktop.
Save EmmanuelGuther/d2b540da3532dc90b679f7f7e3bed730 to your computer and use it in GitHub Desktop.
Data class more clean with extensions
data class Result(
val requestCode: Int,
val data: Intent?,
)
val Result.isOk: Boolean
get() = resultCode == Activity.RESULT_OK
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment