Skip to content

Commit

Permalink
Fix: Carousel _CastError: Null check operator used on a null value (#967
Browse files Browse the repository at this point in the history
)

Co-Authored-By: monsieurtanuki <11576431+monsieurtanuki@users.noreply.github.com>
  • Loading branch information
M123-dev and monsieurtanuki authored Jan 15, 2022
1 parent e30ab6b commit d1c2488
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/smooth_app/lib/widgets/smooth_product_carousel.dart
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ class _SmoothProductCarouselState extends State<SmoothProductCarousel> {
setState(() {
barcodes = model.getBarcodes();
});
_controller.animateToPage(barcodes.length - 1 + _searchCardAdjustment);
if (_controller.ready) {
_controller.animateToPage(barcodes.length - 1 + _searchCardAdjustment);
}
}

@override
Expand Down

0 comments on commit d1c2488

Please sign in to comment.