mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-14 12:06:24 +00:00
Add 'pull to refresh' for StockItem detail view
This commit is contained in:
parent
36a7bd1214
commit
87d400415c
1 changed files with 14 additions and 2 deletions
|
|
@ -42,6 +42,15 @@ class _StockItemDisplayState extends State<StockDetailWidget> {
|
||||||
|
|
||||||
final InvenTreeStockItem item;
|
final InvenTreeStockItem item;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Function to reload the page data
|
||||||
|
*/
|
||||||
|
Future<void> _refresh() async {
|
||||||
|
|
||||||
|
await item.reload();
|
||||||
|
setState(() {});
|
||||||
|
}
|
||||||
|
|
||||||
void _editStockItem() {
|
void _editStockItem() {
|
||||||
// TODO - Form for editing stock item
|
// TODO - Form for editing stock item
|
||||||
}
|
}
|
||||||
|
|
@ -478,10 +487,13 @@ class _StockItemDisplayState extends State<StockDetailWidget> {
|
||||||
children: actionButtons(),
|
children: actionButtons(),
|
||||||
),
|
),
|
||||||
body: Center(
|
body: Center(
|
||||||
|
child: new RefreshIndicator(
|
||||||
|
onRefresh: _refresh,
|
||||||
child: ListView(
|
child: ListView(
|
||||||
children: stockTiles(),
|
children: stockTiles(),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue