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;
|
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,8 +487,11 @@ class _StockItemDisplayState extends State<StockDetailWidget> {
|
|||||||
children: actionButtons(),
|
children: actionButtons(),
|
||||||
),
|
),
|
||||||
body: Center(
|
body: Center(
|
||||||
child: ListView(
|
child: new RefreshIndicator(
|
||||||
children: stockTiles(),
|
onRefresh: _refresh,
|
||||||
|
child: ListView(
|
||||||
|
children: stockTiles(),
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user