Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'FixedScrollMetrics' is not a subtype of type 'InfiniteExtentMetrics' in type cast #14

Closed
slava-vl opened this issue Jul 14, 2023 · 2 comments

Comments

@slava-vl
Copy link

Hi! I using some vertical scrolable widget inside InfiniteCarousel and that works, but with some exception, how can i fix it?

════════ Exception caught by gesture ═══════════════════════════════════════════
The following _TypeError was thrown while handling a gesture:
type 'FixedScrollMetrics' is not a subtype of type 'InfiniteExtentMetrics' in type cast

When the exception was thrown, this was the stack
#0 _InfiniteCarouselState.build. infinite_carousel.dart:163
#1 _NotificationElement.onNotification notification_listener.dart:130
#2 _NotificationNode.dispatchNotification framework.dart:3197
#3 _NotificationNode.dispatchNotification framework.dart:3200
#4 _NotificationNode.dispatchNotification framework.dart:3200
#5 _NotificationNode.dispatchNotification framework.dart:3200
#6 _NotificationNode.dispatchNotification
#7 _NotificationNode.dispatchNotification framework.dart:3200
#8 _NotificationNode.dispatchNotification framework.dart:3200
#9 Element.dispatchNotification framework.dart:4551
#10 Notification.dispatch notification_listener.dart:60
#11 DragScrollActivity.dispatchScrollUpdateNotification scroll_activity.dart:465
#12 ScrollPosition.didUpdateScrollPositionBy scroll_position.dart:896
#13 ScrollPosition.setPixels scroll_position.dart:283
#14 ScrollPositionWithSingleContext.setPixels scroll_position_with_single_context.dart:78
#15 ScrollPositionWithSingleContext.applyUserOffset scroll_position_with_single_context.dart:122
#16 ScrollDragController.update scroll_activity.dart:385
#17 ScrollableState._handleDragUpdate
#18 DragGestureRecognizer._checkUpdate. monodrag.dart:516
#19 GestureRecognizer.invokeCallback recognizer.dart:275
#20 DragGestureRecognizer._checkUpdate monodrag.dart:516
#21 DragGestureRecognizer.handleEvent monodrag.dart:370
#22 PointerRouter._dispatch pointer_router.dart:98
#23 PointerRouter._dispatchEventToRoutes. pointer_router.dart:143
#24 _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:625:13)
#25 PointerRouter._dispatchEventToRoutes pointer_router.dart:141
#26 PointerRouter.route pointer_router.dart:127
#27 GestureBinding.handleEvent binding.dart:465
#28 GestureBinding.dispatchEvent binding.dart:445
#29 RendererBinding.dispatchEvent binding.dart:331
#30 GestureBinding._handlePointerEventImmediately binding.dart:400
#31 GestureBinding.handlePointerEvent binding.dart:363
#32 GestureBinding._flushPointerEventQueue binding.dart:320
#33 GestureBinding._handlePointerDataPacket binding.dart:293
#34 _invoke1 (dart:ui/hooks.dart:158:13)
#35 PlatformDispatcher._dispatchPointerDataPacket (dart:ui/platform_dispatcher.dart:382:7)
#36 _dispatchPointerDataPacket (dart:ui/hooks.dart:91:31)
Handler: "onUpdate"
Recognizer: VerticalDragGestureRecognizer#c741f
start behavior: start

@fretelweb
Copy link
Contributor

Fixed on this PR

https://github.com/GeekyAnts/infinite-carousel-flutter/pull/19/commits

@manuindersekhon
Copy link
Collaborator

Released new version with the fix:
https://pub.dev/packages/infinite_carousel/versions/1.1.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants