mirror of
https://github.com/inventree/inventree-app.git
synced 2025-04-28 13:36:50 +00:00
Add 'pull to refresh' for StockItem detail view
This commit is contained in:
parent
36a7bd1214
commit
87d400415c
@ -42,6 +42,15 @@ class _StockItemDisplayState extends State<StockDetailWidget> {
|
||||
|
||||
final InvenTreeStockItem item;
|
||||
|
||||
/**
|
||||
* Function to reload the page data
|
||||
*/
|
||||
Future<void> _refresh() async {
|
||||
|
||||
await item.reload();
|
||||
setState(() {});
|
||||
}
|
||||
|
||||
void _editStockItem() {
|
||||
// TODO - Form for editing stock item
|
||||
}
|
||||
@ -478,8 +487,11 @@ class _StockItemDisplayState extends State<StockDetailWidget> {
|
||||
children: actionButtons(),
|
||||
),
|
||||
body: Center(
|
||||
child: ListView(
|
||||
children: stockTiles(),
|
||||
child: new RefreshIndicator(
|
||||
onRefresh: _refresh,
|
||||
child: ListView(
|
||||
children: stockTiles(),
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
|
Loading…
x
Reference in New Issue
Block a user