getFile abstract method
ReadProgress?
getFile(
- FileFormat? format,
- AsyncValueChanged<
DataReaderFile> onFile, { - ValueChanged<
Object> ? onError, - bool allowVirtualFiles = true,
- bool synthesizeFilesFromURIs = true,
Loads file for the given format.
If no file for given format is available, null
progress is returned and
the onFile
block will not be called.
Returned progress tracks the progress from method invocation to receiving the file object. To track progress of reading the file you can use reported file size in DataReaderFile when you read the stream.
On most platform the progress will be indeterminate followed by 1.0 at the end. On iOS the progress is bridged to underlying NSProgress object and should be more accurate and cancellable.
Implementation
ReadProgress? getFile(
FileFormat? format,
AsyncValueChanged<DataReaderFile> onFile, {
ValueChanged<Object>? onError,
bool allowVirtualFiles = true,
bool synthesizeFilesFromURIs = true,
});