Skip to content
Snippets Groups Projects
Commit 94028fea authored by vjrj's avatar vjrj
Browse files

Fix setState error when not mounted

parent 2a0e94f3
No related branches found
No related tags found
No related merge requests found
......@@ -29,9 +29,11 @@ class _FirstScreenState extends State<FirstScreen> {
flushbarPosition: FlushbarPosition.TOP,
onStatusChanged: (FlushbarStatus? status) {
if (status == FlushbarStatus.DISMISSED) {
setState(() {
_showFlushbar = false;
});
if (mounted) {
setState(() {
_showFlushbar = false;
});
}
}
},
).show(context);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment