onDownloadProgress property Null safety

(void Function?(int total, int current)?) onDownloadProgress
final

Callback from API to client about request`s upload.

 uno(
 method: 'get',
 url: 'http://bit.ly/2mTM3nY',
 // you can use plain, json(default), arraybuffer and stream;
 responseType: ResponseType.arraybuffer,
 onDownloadProgress: (total, current) {
   final percentCompleted = (current / total * 100).round();
   print('completed: $percentCompleted%');
 },
).then((response) async {
  await File('ada_lovelace.jpg').writeAsBytes(response.data);
});

Implementation

final void Function(int total, int current)? onDownloadProgress;