فهرست منبع

check if mounted

ashilkn 2 سال پیش
والد
کامیت
2fe80cee31
1فایلهای تغییر یافته به همراه3 افزوده شده و 1 حذف شده
  1. 3 1
      lib/ui/viewer/file/file_caption_widget.dart

+ 3 - 1
lib/ui/viewer/file/file_caption_widget.dart

@@ -56,7 +56,9 @@ class _FileCaptionWidgetState extends State<FileCaptionWidget> {
           final isSuccesful =
               await editFileCaption(context, widget.file, editedCaption);
           if (isSuccesful) {
-            Navigator.pop(context);
+            if (mounted) {
+              Navigator.pop(context);
+            }
           }
         }
       },