don't await ensureVisible
This commit is contained in:
parent
9793635bed
commit
647f84f31f
1 changed files with 8 additions and 6 deletions
|
|
@ -58,7 +58,7 @@ class EmojiPicker extends HookConsumerWidget {
|
|||
);
|
||||
|
||||
useEffect(() {
|
||||
void syncSelectedCategoryWithScroll() async {
|
||||
void syncSelectedCategoryWithScroll() {
|
||||
final viewport =
|
||||
scrollViewKey.currentContext?.findRenderObject()
|
||||
as RenderBox?;
|
||||
|
|
@ -86,11 +86,13 @@ class EmojiPicker extends HookConsumerWidget {
|
|||
chipKeys[firstVisibleIndex].currentContext;
|
||||
|
||||
if (chipContext != null) {
|
||||
await Scrollable.ensureVisible(
|
||||
chipContext,
|
||||
duration: Duration(milliseconds: 300),
|
||||
curve: Curves.easeInOut,
|
||||
alignment: 0,
|
||||
unawaited(
|
||||
Scrollable.ensureVisible(
|
||||
chipContext,
|
||||
duration: Duration(milliseconds: 300),
|
||||
curve: Curves.easeInOut,
|
||||
alignment: 0,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue