Trying to fix image loading on dev
This commit is contained in:
@@ -145,7 +145,7 @@ class _PictureWidgetState extends State<PictureWidget> {
|
||||
|
||||
Widget _imageWidget(PictureDto dto) {
|
||||
Header cred = HeaderUtils().getAuthHeader();
|
||||
|
||||
|
||||
return GestureDetector(
|
||||
key: const Key("image"),
|
||||
behavior: HitTestBehavior.opaque,
|
||||
@@ -158,13 +158,14 @@ class _PictureWidgetState extends State<PictureWidget> {
|
||||
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,
|
||||
value: loadingProgress.expectedTotalBytes != null ? loadingProgress.cumulativeBytesLoaded / loadingProgress.expectedTotalBytes! : 0,
|
||||
),
|
||||
);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user