download method
Downloads a file
Implementation
Future<Uint8List> download(String fileId) async {
final response = await _client.get(
Uri.parse('$baseUrl/files/$fileId'),
headers: _headers,
);
if (response.statusCode >= 200 && response.statusCode < 300) {
return response.bodyBytes;
}
_handleResponse(response);
throw const VinculumException('Download failed');
}