From 2fe80cee31e07f044cd9586a22a7845385e649c1 Mon Sep 17 00:00:00 2001 From: ashilkn Date: Mon, 7 Nov 2022 14:32:39 +0530 Subject: [PATCH] check if mounted --- lib/ui/viewer/file/file_caption_widget.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/ui/viewer/file/file_caption_widget.dart b/lib/ui/viewer/file/file_caption_widget.dart index d28448729..91c75b4a9 100644 --- a/lib/ui/viewer/file/file_caption_widget.dart +++ b/lib/ui/viewer/file/file_caption_widget.dart @@ -56,7 +56,9 @@ class _FileCaptionWidgetState extends State { final isSuccesful = await editFileCaption(context, widget.file, editedCaption); if (isSuccesful) { - Navigator.pop(context); + if (mounted) { + Navigator.pop(context); + } } } },