getFile method

  1. @override
  2. @Deprecated('Prefer to use the new getFileStream method')
Stream<FileInfo> getFile(
  1. String url, {
  2. String? key,
  3. Map<String, String>? headers,
})
override

Get the file from the cache and/or online, depending on availability and age. Downloaded form url, headers can be used for example for authentication. The files are returned as stream. First the cached file if available, when the cached file is too old the newly downloaded file is returned afterwards.

Implementation

@override
@Deprecated('Prefer to use the new getFileStream method')
Stream<FileInfo> getFile(String url,
    {String? key, Map<String, String>? headers}) {
  return getFileStream(
    url,
    key: key,
    withProgress: false,
  ).where((r) => r is FileInfo).cast<FileInfo>();
}