check if mounted before setState in message.dart
This commit is contained in:
parent
2a4f5e3462
commit
70fd9e9f2e
1 changed files with 5 additions and 1 deletions
|
|
@ -186,7 +186,11 @@ class Message extends StatelessWidget {
|
|||
if (animateIn && resetAnimateIn != null) {
|
||||
WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
|
||||
animateIn = false;
|
||||
setState(resetAnimateIn);
|
||||
// #Pangea
|
||||
if (context.mounted) {
|
||||
// Pangea#
|
||||
setState(resetAnimateIn);
|
||||
}
|
||||
});
|
||||
}
|
||||
return AnimatedSize(
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue