addDownload method
Implementation
Future<DownloadResponse> addDownload({
required String name,
required String url,
required String httpMethod,
required String moduleName,
Map<String, dynamic>? payload,
}) async {
_triggerFlyAnimation();
final result = await repo.createDownload(
name: name,
url: url,
httpMethod: httpMethod,
moduleName: moduleName,
payload: jsonEncode(payload ?? {}),
);
if (result.success) {
await loadDownloadsIfNeeded(force: true);
}
return result;
}