download method Null safety

  1. @override
Future<ParseWebFile> download(
  1. {ProgressCallback? progressCallback}
)
override

Implementation

@override
Future<ParseWebFile> download({ProgressCallback? progressCallback}) async {
  if (url == null) {
    return this;
  }

  final ParseNetworkByteResponse response = await _client.getBytes(
    url!,
    onReceiveProgress: progressCallback,
  );
  file = response.bytes as Uint8List?;

  return this;
}