chore: snackbar close button

This commit is contained in:
ggurdin 2025-12-19 09:14:19 -05:00
parent d92de722ce
commit f35562f78d
No known key found for this signature in database
GPG key ID: A01CB41737CBB478

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),