I am into kotlin and co-routines since last 8 months, as per my understanding it is not optimal usage of flow if we use it as the return type of an api call.
e.g:
fun getCoutries(): Flow<List<Country>> = flow {
emit(apiInterface.getAllCountries())
}
I am seeing usage of flow like these in one shot api calls, I want to know if this should be discouraged or not. Since flow is to be a stream rather than being one shot.