2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-09-23 03:10:21 +00:00

Add timeout funtionality to GET and LIST requests

This commit is contained in:
Oliver Walters
2020-04-15 09:28:35 +10:00
parent cd864abfbe
commit 5ed13e69aa
2 changed files with 41 additions and 5 deletions

View File

@@ -30,8 +30,7 @@ Future<void> scanQrCode(BuildContext context) async {
*/
InvenTreeAPI().post("barcode/", body: {"barcode": barcode}).then((var response) {
// Close the progress dialog
Navigator.pop(context);
hideProgressDialog(context);
if (response.statusCode != 200) {
showDialog(