1
0
Fork 0
forked from Nexus/nexus

hopefully fix debugLocked error

This commit is contained in:
Henry Hiles 2026-04-14 18:09:31 -04:00
commit f4b2dcb824
Signed by: Henry-Hiles
SSH key fingerprint: SHA256:VKQUdS31Q90KvX7EkKMHMBpUspcmItAh86a+v7PGiIs

View file

@ -36,7 +36,10 @@ class EmojiPickerButton extends HookConsumerWidget {
),
textController: controller
..addListener(() {
Navigator.of(context).pop();
// Without this, there will sometimes be a debugLocked is not true error sometimes
Future.delayed(Duration.zero, () {
if (context.mounted) Navigator.of(context).pop();
});
onSelection?.call(controller.text);
}),
),