Trying to fix image loading on dev
This commit is contained in:
@@ -227,11 +227,7 @@ class _CustomerWidgetState extends State<CustomerWidget> {
|
||||
loadingBuilder: (context, child, loadingProgress) {
|
||||
if (loadingProgress == null) return child;
|
||||
return Center(
|
||||
child: CircularProgressIndicator(
|
||||
value: loadingProgress.expectedTotalBytes != null
|
||||
? loadingProgress.cumulativeBytesLoaded / loadingProgress.expectedTotalBytes!
|
||||
: 0,
|
||||
),
|
||||
child: CircularProgressIndicator(),
|
||||
);
|
||||
},
|
||||
),
|
||||
@@ -348,9 +344,7 @@ class _CustomerWidgetState extends State<CustomerWidget> {
|
||||
|
||||
Future<void> _actionDownload(BuildContext context, CustomerDto customerDto, PictureDto? pictureDto) async {
|
||||
final bytes = await _customerController.export(customerId: customerDto.id, pictureId: pictureDto?.id);
|
||||
final fileName = pictureDto != null
|
||||
? '${customerDto.customerNumber}_${pictureDto.id}.pdf'
|
||||
: '${customerDto.customerNumber}.pdf';
|
||||
final fileName = pictureDto != null ? '${customerDto.customerNumber}_${pictureDto.id}.pdf' : '${customerDto.customerNumber}.pdf';
|
||||
await downloadFile(bytes, fileName);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user