private fun getCountryStateData() { viewModelScope.launch(Dispatchers.IO) { when(val result = getCountryDataUseCase.getCountryState( fullUrl = NetworkingService.instance.getOnboardingAPIURL("onboarding/countries-states"), headers = NetworkingService.instance.anAccessTokenHeadersForSignUp )) { is RemoteResponse.Success -> { _uiState.value = uiState.value.copy( countryOptions = result.value.countries, isLoading = false ) } is RemoteResponse.Failure -> {  } } } }
This method gets the list of all the countries and states for all of the countries in the world