flatAndCollectAsync<T, X> method
Implementation
Future<Response<List<T>>> flatAndCollectAsync<T, X>(
Iterable<X> source,
Future<Response<T>> Function(X source) mapper,
) async {
var response = Responses.success<List<T>>([]);
for (var id in source) {
response = await response.flatMapAsync((tab) => mapper(id).mapToResponse((t) => tab!.appendInPlace(t!)));
}
return response;
}