fix: close emoji menu by ESC key (#4182)

This commit is contained in:
Yijing Huang 2023-12-20 18:32:56 -07:00 committed by GitHub
parent 890285bb7b
commit f760e3d12a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -36,7 +36,8 @@ void showEmojiPickerMenu(
final bottom = alignment == Alignment.bottomLeft ? offset.dy : null;
keepEditorFocusNotifier.increase();
final emojiPickerMenuEntry = FullScreenOverlayEntry(
late OverlayEntry emojiPickerMenuEntry;
emojiPickerMenuEntry = FullScreenOverlayEntry(
top: top,
bottom: bottom,
left: offset.dx,
@ -57,6 +58,7 @@ void showEmojiPickerMenu(
},
onExit: () {
// close emoji panel
emojiPickerMenuEntry.remove();
},
),
),