don't await ensureVisible

This commit is contained in:
Henry Hiles 2026-09-17 11:31:28 -04:00
commit 647f84f31f
Signed by: Henry-Hiles
SSH key fingerprint: SHA256:VKQUdS31Q90KvX7EkKMHMBpUspcmItAh86a+v7PGiIs

View file

@ -58,7 +58,7 @@ class EmojiPicker extends HookConsumerWidget {
); );
useEffect(() { useEffect(() {
void syncSelectedCategoryWithScroll() async { void syncSelectedCategoryWithScroll() {
final viewport = final viewport =
scrollViewKey.currentContext?.findRenderObject() scrollViewKey.currentContext?.findRenderObject()
as RenderBox?; as RenderBox?;
@ -86,11 +86,13 @@ class EmojiPicker extends HookConsumerWidget {
chipKeys[firstVisibleIndex].currentContext; chipKeys[firstVisibleIndex].currentContext;
if (chipContext != null) { if (chipContext != null) {
await Scrollable.ensureVisible( unawaited(
Scrollable.ensureVisible(
chipContext, chipContext,
duration: Duration(milliseconds: 300), duration: Duration(milliseconds: 300),
curve: Curves.easeInOut, curve: Curves.easeInOut,
alignment: 0, alignment: 0,
),
); );
} }
} }