mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-13 03:26:24 +00:00
Thumbnail errors (#708)
* Extract error info from thumbnail errors * Formatting
This commit is contained in:
parent
490d008447
commit
2252dd2fd6
1 changed files with 9 additions and 2 deletions
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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue