From 7283c07b76ba980dfb3f842b3f04a2bc90f288c3 Mon Sep 17 00:00:00 2001 From: Oliver Date: Sun, 23 Nov 2025 09:18:49 +1100 Subject: [PATCH] Form success fix (#733) * Fix order of operations on form success - Pop widget before running callback * Update release notes --- assets/release_notes.md | 5 +++++ lib/api_form.dart | 2 +- pubspec.yaml | 4 ++-- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/assets/release_notes.md b/assets/release_notes.md index f97832ac..17fd96d1 100644 --- a/assets/release_notes.md +++ b/assets/release_notes.md @@ -1,3 +1,8 @@ +### 0.21.1 - November 2025 +--- + +- Fixed app freeze bug after form submission + ### 0.21.0 - November 2025 --- diff --git a/lib/api_form.dart b/lib/api_form.dart index ea0bc79b..429c71d5 100644 --- a/lib/api_form.dart +++ b/lib/api_form.dart @@ -1174,8 +1174,8 @@ class APIFormWidgetState extends State { Map submittedData, Map responseData, ) async { - widget.onSuccess?.call(responseData); Navigator.pop(context); + widget.onSuccess?.call(responseData); } List _buildForm() { diff --git a/pubspec.yaml b/pubspec.yaml index a4450354..bf7987f4 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: inventree description: InvenTree stock management -version: 0.21.0+106 +version: 0.21.1+107 environment: sdk: ^3.8.1 @@ -40,7 +40,7 @@ dependencies: path: ^1.9.0 path_provider: ^2.1.5 # Local file storage sembast: ^3.6.0 # NoSQL data storage - sentry_flutter: 8.14.2 # Error reporting + sentry_flutter: 8.14.2 # Error reporting url_launcher: ^6.3.1 # Open link in system browser wakelock_plus: ^1.3.2 # Prevent device from sleeping