success static method

DownloadResponse<String> success({
  1. required String filePath,
  2. int? totalBytes,
})

创建成功响应

Implementation

static DownloadResponse<String> success({
  required String filePath,
  int? totalBytes,
}) {
  return DownloadResponse<String>(
    isSuccess: true,
    filePath: filePath,
    totalBytes: totalBytes,
    data: filePath, // 将文件路径作为 data
  );
}