DownloadFileUseCase
Downloads a file into the device's public/general storage (system Downloads location) — backs DownloadFile, the only one of the 3 download events whose destination the user can interactively cancel (reflected in DownloadFile's own OnCancelled trigger, handled above this use case). Reachable via get<DownloadFileUseCase>().
Types
Link copied to clipboard
data class Params(val url: String, val headers: Map<String, String>?, val body: Any?, val httpMethod: HttpMethod, val targetFileName: String, val mimeType: String? = null, val onProgress: suspend (Float) -> Unit = {}, val onDownloadFinished: suspend () -> Unit = {}, val onDownloadFailure: suspend (Throwable) -> Unit = {})