mod: 表情去除额外空白;支持悬浮键盘;适配底部虚拟按键

This commit is contained in:
orz12
2024-06-02 14:36:39 +08:00
parent 03b97c5f43
commit 93e369a5f8
2 changed files with 12 additions and 6 deletions

View File

@@ -113,7 +113,7 @@ class _EmotePanelState extends State<EmotePanel>
) )
.toList(), .toList(),
), ),
SizedBox(height: MediaQuery.of(context).padding.bottom + 20), SizedBox(height: MediaQuery.of(context).padding.bottom),
], ],
); );
} else { } else {

View File

@@ -118,10 +118,10 @@ class _VideoReplyNewDialogState extends State<VideoReplyNewDialog>
_debouncer.run(() { _debouncer.run(() {
if (!mounted) return; if (!mounted) return;
if (keyboardHeight == 0 && emoteHeight == 0) { if (keyboardHeight == 0 && emoteHeight == 0) {
setState(() { emoteHeight = keyboardHeight =
emoteHeight = keyboardHeight = keyboardHeight == 0.0 ? viewInsets.bottom : keyboardHeight;
keyboardHeight == 0.0 ? viewInsets.bottom : keyboardHeight; if (emoteHeight < 200) emoteHeight = 200;
}); setState(() {});
} }
}); });
}); });
@@ -224,7 +224,8 @@ class _VideoReplyNewDialogState extends State<VideoReplyNewDialog>
), ),
const Spacer(), const Spacer(),
TextButton( TextButton(
onPressed: () => Get.back(), child: Text('取消', onPressed: () => Get.back(),
child: Text('取消',
style: TextStyle( style: TextStyle(
color: Theme.of(context).colorScheme.secondary))), color: Theme.of(context).colorScheme.secondary))),
const SizedBox(width: 10), const SizedBox(width: 10),
@@ -240,6 +241,11 @@ class _VideoReplyNewDialogState extends State<VideoReplyNewDialog>
onChoose: (package, emote) => onChooseEmote(package, emote), onChoose: (package, emote) => onChooseEmote(package, emote),
), ),
), ),
if (toolbarType == 'input' && keyboardHeight == 0.0)
SizedBox(
width: double.infinity,
height: MediaQuery.of(context).padding.bottom,
)
], ],
), ),
); );