Last active
August 7, 2022 19:23
-
-
Save motorro/39de11c1bd5e303b66db15195c86f342 to your computer and use it in GitHub Desktop.
Dedicated state factory
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
class CredentialsCheckState( | |
data: LoginDataState, | |
private val checkCredentials: CheckCredentials | |
) : CoroutineState<LoginGesture, LoginUiState>() { | |
// State logic | |
/** | |
* Dedicated state factory | |
*/ | |
@LoginScope | |
class Factory @Inject constructor(private val checkCredentials: CheckCredentials) { | |
operator fun invoke(): CoroutineState<LoginGesture, LoginUiState>() = CredentialsCheckState( | |
checkCredentials | |
) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment