mirror of
https://gitlab.com/nkming2/nc-photos.git
synced 2025-01-23 01:06:21 +01:00
19 lines
551 B
Dart
19 lines
551 B
Dart
|
abstract class FileDownloader {
|
||
|
/// Download a file
|
||
|
///
|
||
|
/// The return data depends on the platform
|
||
|
/// - web: null
|
||
|
/// - android: Uri to the downloaded file
|
||
|
///
|
||
|
/// [shouldNotify] is a hint that suggest whether to notify user about the
|
||
|
/// progress. The actual decision is made by the underlying platform code and
|
||
|
/// is not guaranteed to respect this flag
|
||
|
Future<dynamic> downloadUrl({
|
||
|
required String url,
|
||
|
Map<String, String>? headers,
|
||
|
String? mimeType,
|
||
|
required String filename,
|
||
|
bool? shouldNotify,
|
||
|
});
|
||
|
}
|