check if mounted before setState in message.dart

This commit is contained in:
ggurdin 2024-10-28 16:21:25 -04:00
parent 2a4f5e3462
commit 70fd9e9f2e
No known key found for this signature in database
GPG key ID: A01CB41737CBB478

View file

@ -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(