downloadDocumentBytes method
Future<Uint8List?>
downloadDocumentBytes(
- String? accessToken,
- String reference,
- DocumentTypes type
override
Implementation
@override
Future<Uint8List?> downloadDocumentBytes(String? accessToken, String reference, DocumentTypes type) async {
switch (type) {
case DocumentTypes.pdf:
return await apiController.downloadBytes(accessToken, 'api/ubl2.1/download/$reference.pdf');
case DocumentTypes.xml:
return await apiController.downloadBytes(accessToken, 'api/ubl2.1/download/$reference.xml');
default: return null;
}
}