From 93e369a5f8d71be42ae6497b986f5ed1c69021fa Mon Sep 17 00:00:00 2001 From: orz12 Date: Sun, 2 Jun 2024 14:36:39 +0800 Subject: [PATCH] =?UTF-8?q?mod:=20=E8=A1=A8=E6=83=85=E5=8E=BB=E9=99=A4?= =?UTF-8?q?=E9=A2=9D=E5=A4=96=E7=A9=BA=E7=99=BD=EF=BC=9B=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E6=82=AC=E6=B5=AE=E9=94=AE=E7=9B=98=EF=BC=9B=E9=80=82=E9=85=8D?= =?UTF-8?q?=E5=BA=95=E9=83=A8=E8=99=9A=E6=8B=9F=E6=8C=89=E9=94=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/emote/view.dart | 2 +- lib/pages/video/detail/reply_new/view.dart | 16 +++++++++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/lib/pages/emote/view.dart b/lib/pages/emote/view.dart index ffbd4f72..7268675f 100644 --- a/lib/pages/emote/view.dart +++ b/lib/pages/emote/view.dart @@ -113,7 +113,7 @@ class _EmotePanelState extends State ) .toList(), ), - SizedBox(height: MediaQuery.of(context).padding.bottom + 20), + SizedBox(height: MediaQuery.of(context).padding.bottom), ], ); } else { diff --git a/lib/pages/video/detail/reply_new/view.dart b/lib/pages/video/detail/reply_new/view.dart index 18d3fba4..a003eb92 100644 --- a/lib/pages/video/detail/reply_new/view.dart +++ b/lib/pages/video/detail/reply_new/view.dart @@ -118,10 +118,10 @@ class _VideoReplyNewDialogState extends State _debouncer.run(() { if (!mounted) return; if (keyboardHeight == 0 && emoteHeight == 0) { - setState(() { - emoteHeight = keyboardHeight = - keyboardHeight == 0.0 ? viewInsets.bottom : keyboardHeight; - }); + emoteHeight = keyboardHeight = + keyboardHeight == 0.0 ? viewInsets.bottom : keyboardHeight; + if (emoteHeight < 200) emoteHeight = 200; + setState(() {}); } }); }); @@ -224,7 +224,8 @@ class _VideoReplyNewDialogState extends State ), const Spacer(), TextButton( - onPressed: () => Get.back(), child: Text('取消', + onPressed: () => Get.back(), + child: Text('取消', style: TextStyle( color: Theme.of(context).colorScheme.secondary))), const SizedBox(width: 10), @@ -240,6 +241,11 @@ class _VideoReplyNewDialogState extends State onChoose: (package, emote) => onChooseEmote(package, emote), ), ), + if (toolbarType == 'input' && keyboardHeight == 0.0) + SizedBox( + width: double.infinity, + height: MediaQuery.of(context).padding.bottom, + ) ], ), );