mirror of
https://github.com/inventree/inventree-app.git
synced 2025-11-05 07:45:39 +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(
|
||||
imageUrl: url,
|
||||
placeholder: (context, url) => CircularProgressIndicator(),
|
||||
errorWidget: (context, url, error) =>
|
||||
Icon(TablerIcons.circle_x, color: COLOR_DANGER),
|
||||
errorWidget: (context, url, error) {
|
||||
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(),
|
||||
height: height,
|
||||
width: width,
|
||||
|
||||
Reference in New Issue
Block a user