check if mounted

This commit is contained in:
ashilkn 2022-11-07 14:32:39 +05:30
parent cccc43124a
commit 2fe80cee31

View file

@ -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);
}
}
}
},