When I want to set live-data to mutable live data I call live data.getvalue() but it returns null
private const val TAG = "MainViewModel"
@HiltViewModel class MainViewModel @Inject constructor(private val repository: VaultRepository) : ViewModel() { private var dashMutableData = MutableLiveData<List>() var dashLiveData: LiveData<List> = dashMutableData
init {
Log.d(TAG, " Init Executed ")
viewModelScope.launch(Dispatchers.Default) {
var liveData: LiveData<List<CategoriesModel>> = repository.getDashBoardData()
Log.d(TAG, "${liveData.value}")
dashMutableData.postValue(liveData.value)
}
}
}