inFlightRequest<T extends Object> method
Gets the result of an in-flight request
key - The key of the request
Returns a future that completes with the request result
Implementation
Future<T?> inFlightRequest<T extends Object>(String key) async {
final future = _inFlightSets[T]?[key]?.completer.future;
if (future == null) {
return null;
}
return (future as Future<T?>).then((value) {
_inFlightSets[T]?.remove(key);
return value;
});
}