2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-06-13 10:45:29 +00:00

Display overlay screen for blocking operations (#186)

* Catch state error in homepage widget

* Add flutter_overlay_loader lib

- Displays an overlay screen to indicate blocking operation

* Wrap blocking widget transitions in a loading overlay

- Prevents user from doing other things while loading
- Shows the user that something is happening

* Linting fixes

* Show overlay when uploading attachment file

* Show overlay when downloading file also

* Show overlay when loading or submitting API forms

- Major improvements to usability "feel"

* UI improvements for stock item test results widget

* Fix API_FORM bug

- onSuccess function was not being called
This commit is contained in:
Oliver
2022-07-20 09:05:21 +10:00
committed by GitHub
parent 277193ecb0
commit 01dd046dd1
20 changed files with 150 additions and 183 deletions

View File

@ -104,6 +104,10 @@ class _PaginatedPartListState extends PaginatedSearchState<PaginatedPartList> {
"label": L10().filterTemplate,
"help_text": L10().filterTemplateDetail
},
"trackable": {
"label": L10().filterTrackable,
"help_text": L10().filterTrackableDetail,
},
"virtual": {
"label": L10().filterVirtual,
"help_text": L10().filterVirtualDetail,
@ -122,15 +126,6 @@ class _PaginatedPartListState extends PaginatedSearchState<PaginatedPartList> {
return page;
}
void _openPart(BuildContext context, int pk) {
// Attempt to load the part information
InvenTreePart().get(pk).then((var part) {
if (part is InvenTreePart) {
Navigator.push(context, MaterialPageRoute(builder: (context) => PartDetailWidget(part)));
}
});
}
@override
Widget buildItem(BuildContext context, InvenTreeModel model) {
@ -147,7 +142,7 @@ class _PaginatedPartListState extends PaginatedSearchState<PaginatedPartList> {
height: 40,
),
onTap: () {
_openPart(context, part.pk);
Navigator.push(context, MaterialPageRoute(builder: (context) => PartDetailWidget(part)));
},
);
}