2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-06-12 18:25:26 +00:00

Driving the refactor tractor

- InvenTreeAPI() object now has a method to return a cache-backed image from the server
This commit is contained in:
Oliver Walters
2020-04-05 00:34:08 +11:00
parent 528215455d
commit cd4731833d
3 changed files with 25 additions and 17 deletions

View File

@ -180,12 +180,7 @@ class PartList extends StatelessWidget {
title: Text("${part.name}"),
subtitle: Text("${part.description}"),
leading: Image(
image: AdvancedNetworkImage(
part.thumbnail,
header: InvenTreeAPI().defaultHeaders(),
useDiskCache: true,
cacheRule: CacheRule(maxAge: const Duration(days: 1)),
),
image: InvenTreeAPI().getImage(part.thumbnail),
width: 48,
),
onTap: () {