Created
June 19, 2020 00:50
-
-
Save Zhuinden/57fdc35430655126409fcca8d5d3c601 to your computer and use it in GitHub Desktop.
Hilt LoginViewModel
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 LoginViewModel @ViewModelInject constructor( | |
private val navigationDispatcher: NavigationDispatcher, | |
@Assisted private val savedStateHandle: SavedStateHandle | |
) : ViewModel() { | |
fun onRegisterClicked() { | |
navigationDispatcher.emit { navController -> | |
navController.navigate(R.id.logged_out_to_registration) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment