From c8f09ed62ec2756476fa781cb6cca79e107d6d66 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Sun, 5 Apr 2020 00:46:33 +1100 Subject: [PATCH] Display stock list using ListTiles --- lib/widget/location_display.dart | 34 +++++++++++--------------------- 1 file changed, 12 insertions(+), 22 deletions(-) diff --git a/lib/widget/location_display.dart b/lib/widget/location_display.dart index 2b589ae3..c6690eda 100644 --- a/lib/widget/location_display.dart +++ b/lib/widget/location_display.dart @@ -143,17 +143,12 @@ class SublocationList extends StatelessWidget { Widget _build(BuildContext context, int index) { InvenTreeStockLocation loc = _locations[index]; - return Card( - child: InkWell( - child: Column( - children: [ - Text('${loc.name} - ${loc.description}'), - ], - ), - onTap: () { - _openLocation(context, loc.pk); - }, - ) + return ListTile( + title: Text('${loc.name}'), + subtitle: Text("${loc.description}"), + onTap: () { + _openLocation(context, loc.pk); + }, ); } @@ -179,17 +174,12 @@ class StockList extends StatelessWidget { Widget _build(BuildContext context, int index) { InvenTreeStockItem item = _items[index]; - return Card( - child: InkWell( - child: Column( - children: [ - Text('${item.quantity.toString()} x ${item.partName}') - ] - ), - onTap: () { - _openItem(context, item.pk); - }, - ) + return ListTile( + title: Text("${item.quantity.toString()} x ${item.partName}"), + subtitle: Text("${item.description}"), + onTap: () { + _openItem(context, item.pk); + }, ); }