Created
December 11, 2022 20:00
-
-
Save aymenjegham/b1dfd2d97199ecdb934250fe76b68c61 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
sealed class NetworkResult<T>( | |
val data: T? = null, | |
val message: String? = null | |
) { | |
class Success<T>(data: T) : NetworkResult<T>(data) | |
class Error<T>(message: String?, data: T? = null) : NetworkResult<T>(data, message) | |
class Loading<T> : NetworkResult<T>() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment