Skip to content

Commit

Permalink
1836: wait if controller is ready before jumping to a particular card…
Browse files Browse the repository at this point in the history
… index
  • Loading branch information
f1sh1918 committed Dec 10, 2024
1 parent 8d496ac commit 629b706
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion frontend/lib/identification/identification_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ class IdentificationPageState extends State<IdentificationPage> {
super.initState();
cardIndex = widget.initialCardIndex ?? 0;
WidgetsBinding.instance.addPostFrameCallback((_) {
carouselController.jumpToPage(cardIndex);
if (carouselController.ready) {
carouselController.jumpToPage(cardIndex);
}
});
}

Expand Down

0 comments on commit 629b706

Please sign in to comment.