From bf02f143ddc00b49b553ea1f8e4845e8ea71f45e Mon Sep 17 00:00:00 2001
From: verboomp
Date: Tue, 3 Feb 2026 15:46:43 +0100
Subject: [PATCH] Trying to fix image loading on dev
---
.../lib/pages/customer/customer_widget.dart | 10 ++--------
.../lib/pages/customer/picture_fullscreen_dialog.dart | 8 +-------
.../lib/pages/customer/picture_widget.dart | 7 +------
3 files changed, 4 insertions(+), 21 deletions(-)
diff --git a/hartmann-foto-documentation-frontend/lib/pages/customer/customer_widget.dart b/hartmann-foto-documentation-frontend/lib/pages/customer/customer_widget.dart
index 0c288c7..e47c517 100644
--- a/hartmann-foto-documentation-frontend/lib/pages/customer/customer_widget.dart
+++ b/hartmann-foto-documentation-frontend/lib/pages/customer/customer_widget.dart
@@ -227,11 +227,7 @@ class _CustomerWidgetState extends State {
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 {
Future _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);
}
}
diff --git a/hartmann-foto-documentation-frontend/lib/pages/customer/picture_fullscreen_dialog.dart b/hartmann-foto-documentation-frontend/lib/pages/customer/picture_fullscreen_dialog.dart
index 21896d3..c9095cb 100644
--- a/hartmann-foto-documentation-frontend/lib/pages/customer/picture_fullscreen_dialog.dart
+++ b/hartmann-foto-documentation-frontend/lib/pages/customer/picture_fullscreen_dialog.dart
@@ -46,7 +46,6 @@ class PictureFullscreenDialog extends StatelessWidget {
height: dialogHeight,
child: InteractiveViewer(
constrained: true,
- //boundaryMargin: EdgeInsets.all(20),
panEnabled: true,
scaleEnabled: true,
minScale: 0.5,
@@ -54,15 +53,10 @@ class PictureFullscreenDialog extends StatelessWidget {
child: Image.network(
headers: {cred.name: cred.value},
dto.imageUrl,
- frameBuilder: (context, child, frame, wasSynchronouslyLoaded) {
- return child;
- },
loadingBuilder: (context, child, loadingProgress) {
if (loadingProgress == null) return child;
return Center(
- child: CircularProgressIndicator(
- value: loadingProgress.expectedTotalBytes != null ? loadingProgress.cumulativeBytesLoaded / loadingProgress.expectedTotalBytes! : 0,
- ),
+ child: CircularProgressIndicator(),
);
},
),
diff --git a/hartmann-foto-documentation-frontend/lib/pages/customer/picture_widget.dart b/hartmann-foto-documentation-frontend/lib/pages/customer/picture_widget.dart
index cb8dfbb..6d99212 100644
--- a/hartmann-foto-documentation-frontend/lib/pages/customer/picture_widget.dart
+++ b/hartmann-foto-documentation-frontend/lib/pages/customer/picture_widget.dart
@@ -158,15 +158,10 @@ class _PictureWidgetState extends State {
headers: {cred.name: cred.value},
dto.normalSizeUrl,
fit: BoxFit.contain,
- frameBuilder: (context, child, frame, wasSynchronouslyLoaded) {
- return child;
- },
loadingBuilder: (context, child, loadingProgress) {
if (loadingProgress == null) return child;
return Center(
- child: CircularProgressIndicator(
- value: loadingProgress.expectedTotalBytes != null ? loadingProgress.cumulativeBytesLoaded / loadingProgress.expectedTotalBytes! : 0,
- ),
+ child: CircularProgressIndicator(),
);
},
),