download method
Implementation
@override
Future<ParseFile> download({ProgressCallback? progressCallback}) async {
if (url == null) {
return this;
}
file = File('${ParseCoreData().fileDirectory}/$name');
await file!.create();
progressCallback ??= _progressCallback;
_cancelToken = CancelToken();
final ParseNetworkByteResponse response = await _client.getBytes(
url!,
onReceiveProgress: progressCallback,
cancelToken: _cancelToken,
);
await file!.writeAsBytes(response.bytes!);
return this;
}