mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-13 11:36: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;
|
||||
|
||||
/**
|
||||
* 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…
Add table
Add a link
Reference in a new issue