markAsInFlight<T extends Object> method

void markAsInFlight<T extends Object>(
  1. String key
)
inherited

Marks a request as in-flight

key - The key of the request

Implementation

void markAsInFlight<T extends Object>(String key) async {
  if (!isKeyInFlight(key)) {
    _inFlightSets[T] ??= LinkedHashMap<String, InFlightEntry<Object?>>();
    _inFlightSets[T]?[key] = InFlightEntry<T>(Completer(), DateTime.now());
  }
}