private fun useEmailAsUserName(value: Boolean) { _uiState.value = uiState.value.copy( emailAsUser = value, userName = uiState.value.email ) }
Function to change the state of the checkbox for user email as username