execute<T> method
Future<T>
execute<T>({
- required Future<
T> function(), - RequestType type = RequestType.singleExecution,
- required String key,
Execute a function with request type and key
Implementation
Future<T> execute<T>({
required Future<T> Function() function,
RequestType type = RequestType.singleExecution,
required String key,
}) async {
switch (type) {
case RequestType.singleExecution:
return _handleSingleExecution(function, key);
case RequestType.cancelAll:
return _handleCancelAll(function, key);
case RequestType.forceCall:
return _handleForceCall(function, key);
}
}