Hi, how i use the api response from viewModel to C...
# compose
a
Hi, how i use the api response from viewModel to Composable function? Like i have a this code, how i observe the flightsList and show the data in Composable function?
Copy code
private val _flightList = MutableLiveData<List<FlightListingUiModel>>()
val flightsList: LiveData<List<FlightListingUiModel>> = _flightList
m
try, inside the compose:
Copy code
val flihtList by viewModel.flightList.observeAsState()