fix: 私信页面表情面板 issues #588
This commit is contained in:
@ -109,6 +109,8 @@ class _VideoReplyNewDialogState extends State<VideoReplyNewDialog>
|
|||||||
@override
|
@override
|
||||||
void didChangeMetrics() {
|
void didChangeMetrics() {
|
||||||
super.didChangeMetrics();
|
super.didChangeMetrics();
|
||||||
|
final String routePath = Get.currentRoute;
|
||||||
|
if (mounted && routePath.startsWith('/video')) {
|
||||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||||
// 键盘高度
|
// 键盘高度
|
||||||
final viewInsets = EdgeInsets.fromViewPadding(
|
final viewInsets = EdgeInsets.fromViewPadding(
|
||||||
@ -125,17 +127,22 @@ class _VideoReplyNewDialogState extends State<VideoReplyNewDialog>
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
WidgetsBinding.instance.removeObserver(this);
|
WidgetsBinding.instance.removeObserver(this);
|
||||||
_replyContentController.dispose();
|
_replyContentController.dispose();
|
||||||
replyContentFocusNode.removeListener(() {});
|
replyContentFocusNode.removeListener(() {});
|
||||||
|
replyContentFocusNode.dispose();
|
||||||
super.dispose();
|
super.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
double keyboardHeight = EdgeInsets.fromViewPadding(
|
||||||
|
View.of(context).viewInsets, View.of(context).devicePixelRatio)
|
||||||
|
.bottom;
|
||||||
return Container(
|
return Container(
|
||||||
clipBehavior: Clip.hardEdge,
|
clipBehavior: Clip.hardEdge,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
|
|||||||
@ -51,6 +51,8 @@ class _WhisperDetailPageState extends State<WhisperDetailPage>
|
|||||||
@override
|
@override
|
||||||
void didChangeMetrics() {
|
void didChangeMetrics() {
|
||||||
super.didChangeMetrics();
|
super.didChangeMetrics();
|
||||||
|
final String routePath = Get.currentRoute;
|
||||||
|
if (mounted && routePath.startsWith('/whisper_detail')) {
|
||||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||||
// 键盘高度
|
// 键盘高度
|
||||||
final viewInsets = EdgeInsets.fromViewPadding(
|
final viewInsets = EdgeInsets.fromViewPadding(
|
||||||
@ -67,11 +69,13 @@ class _WhisperDetailPageState extends State<WhisperDetailPage>
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void dispose() {
|
void dispose() {
|
||||||
WidgetsBinding.instance.removeObserver(this);
|
WidgetsBinding.instance.removeObserver(this);
|
||||||
replyContentFocusNode.removeListener(() {});
|
replyContentFocusNode.removeListener(() {});
|
||||||
|
replyContentFocusNode.dispose();
|
||||||
super.dispose();
|
super.dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user