fix: before popping in futureloadingdialog, check if canPop (#1914)

This commit is contained in:
ggurdin 2025-02-25 13:03:40 -05:00 committed by GitHub
parent 5367dbfb59
commit 1ce541d254
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -113,7 +113,7 @@ class LoadingDialogState<T> extends State<LoadingDialog> {
// stackTrace = s;
// }),
(result) {
if (mounted) {
if (mounted && Navigator.of(context).canPop()) {
Navigator.of(context).pop<Result<T>>(Result.value(result));
}
},