Skip to content

Instantly share code, notes, and snippets.

@motorro
Created August 7, 2022 13:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save motorro/b0be0b17e3fdeca79e7331506b4e6960 to your computer and use it in GitHub Desktop.
Save motorro/b0be0b17e3fdeca79e7331506b4e6960 to your computer and use it in GitHub Desktop.
Login state factory interface
interface LoginStateFactory {
/**
* Creates a state to handle existing user's password entry
* @param data Login data state
*/
fun passwordEntry(data: LoginDataState): LoginState
/**
* Creates a state to check email/password
* @param data Data state
*/
fun checking(data: LoginDataState): LoginState
/**
* Creates a state for password error screen
*/
fun error(data: LoginDataState, error: Throwable): LoginState
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment