Merge pull request #4909 from pangeachat/4908-cant-close-emoji-selected-popup

chore: snackbar close button
This commit is contained in:
ggurdin 2025-12-19 09:14:50 -05:00 committed by GitHub
commit 6671abebd8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -38,6 +38,7 @@ mixin LemmaEmojiSetter {
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
padding: const EdgeInsets.all(8.0),
content: Row(
spacing: 8.0,
children: [
@ -58,7 +59,7 @@ mixin LemmaEmojiSetter {
);
},
),
Flexible(
Expanded(
child: Text(
L10n.of(context).emojiSelectedSnackbar(constructId.lemma),
textAlign: TextAlign.center,
@ -67,6 +68,12 @@ mixin LemmaEmojiSetter {
),
),
),
IconButton(
icon: const Icon(Icons.close),
color: Theme.of(context).colorScheme.surface,
onPressed: () =>
ScaffoldMessenger.of(context).hideCurrentSnackBar(),
),
],
),
duration: const Duration(seconds: 30),