fix: 评论回复State对象失效

This commit is contained in:
orz12
2024-02-26 13:43:30 +08:00
parent 1e47096ffa
commit c1a66fd1d5

View File

@@ -111,6 +111,7 @@ class _VideoReplyNewDialogState extends State<VideoReplyNewDialog>
super.didChangeMetrics();
WidgetsBinding.instance.addPostFrameCallback((_) {
// 键盘高度
if (mounted) {
final viewInsets = EdgeInsets.fromViewPadding(
View.of(context).viewInsets, View.of(context).devicePixelRatio);
_debouncer.run(() {
@@ -123,6 +124,7 @@ class _VideoReplyNewDialogState extends State<VideoReplyNewDialog>
}
}
});
}
});
}
@@ -131,6 +133,7 @@ class _VideoReplyNewDialogState extends State<VideoReplyNewDialog>
WidgetsBinding.instance.removeObserver(this);
_replyContentController.dispose();
replyContentFocusNode.removeListener(() {});
replyContentFocusNode.dispose();
super.dispose();
}