Skip to content

Commit

Permalink
fix: 评论框切换action时高度跳动
Browse files Browse the repository at this point in the history
  • Loading branch information
guozhigq committed Apr 2, 2024
1 parent 3fa72f5 commit 74f6b0a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/pages/video/detail/reply_new/view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,10 @@ class _VideoReplyNewDialogState extends State<VideoReplyNewDialog>

@override
Widget build(BuildContext context) {
double keyboardHeight = EdgeInsets.fromViewPadding(
double _keyboardHeight = EdgeInsets.fromViewPadding(
View.of(context).viewInsets, View.of(context).devicePixelRatio)
.bottom;
print('_keyboardHeight: $_keyboardHeight');
return Container(
clipBehavior: Clip.hardEdge,
decoration: BoxDecoration(
Expand Down Expand Up @@ -235,7 +236,11 @@ class _VideoReplyNewDialogState extends State<VideoReplyNewDialog>
duration: const Duration(milliseconds: 300),
child: SizedBox(
width: double.infinity,
height: toolbarType == 'input' ? keyboardHeight : emoteHeight,
height: toolbarType == 'input'
? (_keyboardHeight > keyboardHeight
? _keyboardHeight
: keyboardHeight)
: emoteHeight,
child: EmotePanel(
onChoose: (package, emote) => onChooseEmote(package, emote),
),
Expand Down

0 comments on commit 74f6b0a

Please sign in to comment.