diff --git a/lib/widget/stock_detail.dart b/lib/widget/stock_detail.dart index 0c03c407..80a66331 100644 --- a/lib/widget/stock_detail.dart +++ b/lib/widget/stock_detail.dart @@ -42,6 +42,15 @@ class _StockItemDisplayState extends State { final InvenTreeStockItem item; + /** + * Function to reload the page data + */ + Future _refresh() async { + + await item.reload(); + setState(() {}); + } + void _editStockItem() { // TODO - Form for editing stock item } @@ -478,8 +487,11 @@ class _StockItemDisplayState extends State { children: actionButtons(), ), body: Center( - child: ListView( - children: stockTiles(), + child: new RefreshIndicator( + onRefresh: _refresh, + child: ListView( + children: stockTiles(), + ) ) ) );