check if mounted
This commit is contained in:
parent
cccc43124a
commit
2fe80cee31
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue