mirror of
https://github.com/inventree/inventree-app.git
synced 2025-11-05 15:55:38 +00:00
Thumbnail errors (#708)
* Extract error info from thumbnail errors * Formatting
This commit is contained in:
11
lib/api.dart
11
lib/api.dart
@@ -1545,8 +1545,15 @@ class InvenTreeAPI {
|
|||||||
return CachedNetworkImage(
|
return CachedNetworkImage(
|
||||||
imageUrl: url,
|
imageUrl: url,
|
||||||
placeholder: (context, url) => CircularProgressIndicator(),
|
placeholder: (context, url) => CircularProgressIndicator(),
|
||||||
errorWidget: (context, url, error) =>
|
errorWidget: (context, url, error) {
|
||||||
Icon(TablerIcons.circle_x, color: COLOR_DANGER),
|
print("CachedNetworkimage error: ${error.toString()}");
|
||||||
|
return GestureDetector(
|
||||||
|
child: Icon(TablerIcons.circle_x, color: COLOR_DANGER),
|
||||||
|
onTap: () => {
|
||||||
|
showSnackIcon(error.toString().split(",")[0], success: false),
|
||||||
|
},
|
||||||
|
);
|
||||||
|
},
|
||||||
httpHeaders: defaultHeaders(),
|
httpHeaders: defaultHeaders(),
|
||||||
height: height,
|
height: height,
|
||||||
width: width,
|
width: width,
|
||||||
|
|||||||
Reference in New Issue
Block a user