mirror of
https://github.com/inventree/inventree-app.git
synced 2025-06-12 18:25:26 +00:00
Display part thumbnail in part list
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
|
||||
import 'package:InvenTree/api.dart';
|
||||
import 'package:InvenTree/inventree/part.dart';
|
||||
|
||||
import 'package:InvenTree/widget/part_display.dart';
|
||||
@ -8,6 +9,8 @@ import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'package:flutter_advanced_networkimage/provider.dart';
|
||||
|
||||
class CategoryDisplayWidget extends StatefulWidget {
|
||||
|
||||
CategoryDisplayWidget(this.category, {Key key}) : super(key: key);
|
||||
@ -176,14 +179,15 @@ class PartList extends StatelessWidget {
|
||||
return ListTile(
|
||||
title: Text("${part.name}"),
|
||||
subtitle: Text("${part.description}"),
|
||||
|
||||
/*
|
||||
leading: CachedNetworkImage(
|
||||
imageUrl: part.imageurl,
|
||||
placeholder: (context, url) => CircularProgressIndicator(),
|
||||
errorWidget: (context, url, error) => Icon(Icons.error),
|
||||
leading: Image(
|
||||
image: AdvancedNetworkImage(
|
||||
part.thumbnail,
|
||||
header: InvenTreeAPI().defaultHeaders(),
|
||||
useDiskCache: true,
|
||||
cacheRule: CacheRule(maxAge: const Duration(days: 1)),
|
||||
),
|
||||
width: 48,
|
||||
),
|
||||
*/
|
||||
onTap: () {
|
||||
_openPart(context, part.pk);
|
||||
},
|
||||
|
Reference in New Issue
Block a user