Created
January 2, 2022 10:44
-
-
Save tamtom/994dba813761987c5b04002b01720501 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
@Composable | |
fun LoginScreen //.... | |
//.... | |
Button( | |
onClick = { | |
action.invoke(Login) | |
}, modifier = Modifier | |
.fillMaxWidth() | |
.padding(top = 32.dp) | |
.defaultMinSize(minHeight = 48.dp) | |
) { | |
if (loginState.isLoading) { | |
CircularProgressIndicator( | |
color = MaterialTheme.colors.onPrimary, modifier = Modifier.size(24.dp, 24.dp), | |
strokeWidth = 2.dp | |
) | |
} else { | |
Text(text = stringResource(string.login)) | |
} | |
} | |
if(loginState.isSuccess) { | |
navigateToHome() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment