aguilaair / lazy_data_table_plus

BSD 2-Clause "Simplified" License
2 stars 1 forks source link

Windows: A Scrollbar cannot be painted without a ScrollPosition. #3

Open hamzamon opened 1 year ago

hamzamon commented 1 year ago

plugin: lazy_data_table_plus: ^1.0.0

The Scrollbar attempted to use the provided ScrollController. This ScrollController should be associated with the ScrollView that the Scrollbar is being applied to.When providing your own ScrollController, ensure both the Scrollbar and the Scrollable widget use the same one.

When the exception was thrown, this was the stack:

0 RawScrollbarState._debugCheckHasValidScrollPosition. (package:flutter/src/widgets/scrollbar.dart:1503:9)

1 RawScrollbarState._debugCheckHasValidScrollPosition (package:flutter/src/widgets/scrollbar.dart:1528:6)

2 RawScrollbarState._validateInteractions (package:flutter/src/widgets/scrollbar.dart:1470:14)

3 AnimationLocalStatusListenersMixin.notifyStatusListeners (package:flutter/src/animation/listener_helpers.dart:240:19)

4 AnimationController._checkStatusChanged (package:flutter/src/animation/animation_controller.dart:822:7)

5 AnimationController._startSimulation (package:flutter/src/animation/animation_controller.dart:756:5)

6 AnimationController._animateToInternal (package:flutter/src/animation/animation_controller.dart:619:12)

7 AnimationController.reverse (package:flutter/src/animation/animation_controller.dart:501:12)

8 RawScrollbarState._maybeStartFadeoutTimer. (package:flutter/src/widgets/scrollbar.dart:1663:37)

(elided 4 frames from class _RawReceivePortImpl, class _Timer, and dart:async-patch) The AnimationController notifying status listeners was: AnimationController#8a818(◀ 1.000)

======== Exception caught by animation library =====================================================

hamzamon commented 1 year ago

Hello, When I can expect this fix ?

aguilaair commented 1 year ago

When I have some time to work on it, you can always give it a try yourself, it's not that big of a library

hamzamon commented 1 year ago

I have already tried by wraping Scrollbar(), but couldn't find option to hide scroll bar in pluggin and still I can see the error, If you dont mind please give me a hint.

hamzamon commented 1 year ago

Any update?

aguilaair commented 1 year ago

Can you give me a minimal reproducible sample of this error? I'll take a look this week!

hamzamon commented 1 year ago

You can resproduce by just scrolling the items by clicking in the table..

======== Exception caught by animation library ===================================================== The following assertion was thrown while notifying status listeners for AnimationController: The Scrollbar's ScrollController has no ScrollPosition attached.

A Scrollbar cannot be painted without a ScrollPosition.

The Scrollbar attempted to use the provided ScrollController. This ScrollController should be associated with the ScrollView that the Scrollbar is being applied to.When providing your own ScrollController, ensure both the Scrollbar and the Scrollable widget use the same one.

When the exception was thrown, this was the stack:

0 RawScrollbarState._debugCheckHasValidScrollPosition. (package:flutter/src/widgets/scrollbar.dart:1503:9)

1 RawScrollbarState._debugCheckHasValidScrollPosition (package:flutter/src/widgets/scrollbar.dart:1528:6)

2 RawScrollbarState._validateInteractions (package:flutter/src/widgets/scrollbar.dart:1470:14)

3 AnimationLocalStatusListenersMixin.notifyStatusListeners (package:flutter/src/animation/listener_helpers.dart:240:19)

4 AnimationController._checkStatusChanged (package:flutter/src/animation/animation_controller.dart:822:7)

5 AnimationController._startSimulation (package:flutter/src/animation/animation_controller.dart:756:5)

6 AnimationController._animateToInternal (package:flutter/src/animation/animation_controller.dart:619:12)

7 AnimationController.forward (package:flutter/src/animation/animation_controller.dart:467:12)

8 RawScrollbarState._handleScrollNotification (package:flutter/src/widgets/scrollbar.dart:1863:37)

9 _NotificationElement.onNotification (package:flutter/src/widgets/notification_listener.dart:130:38)

10 _NotificationNode.dispatchNotification (package:flutter/src/widgets/framework.dart:3094:18)

11 _NotificationNode.dispatchNotification (package:flutter/src/widgets/framework.dart:3097:13)

12 Element.dispatchNotification (package:flutter/src/widgets/framework.dart:4441:24)

13 Notification.dispatch (package:flutter/src/widgets/notification_listener.dart:60:13)

14 ScrollActivity.dispatchScrollUpdateNotification (package:flutter/src/widgets/scroll_activity.dart:92:92)

15 ScrollPosition.didUpdateScrollPositionBy (package:flutter/src/widgets/scroll_position.dart:914:15)

16 ScrollPositionWithSingleContext.jumpTo (package:flutter/src/widgets/scroll_position_with_single_context.dart:199:7)

17 _CustomScrollController.jumpTo (package:lazy_data_table_plus/lazy_data_table_plus.dart:436:18)

18 _CustomScrollController.jump (package:lazy_data_table_plus/lazy_data_table_plus.dart:443:5)

19 _LazyDataTableState.jump (package:lazy_data_table_plus/lazy_data_table_plus.dart:300:27)

20 _LazyDataTableState.build. (package:lazy_data_table_plus/lazy_data_table_plus.dart:121:11)

21 DragGestureRecognizer._checkUpdate. (package:flutter/src/gestures/monodrag.dart:483:55)

22 GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:253:24)

23 DragGestureRecognizer._checkUpdate (package:flutter/src/gestures/monodrag.dart:483:7)

24 DragGestureRecognizer.handleEvent (package:flutter/src/gestures/monodrag.dart:330:9)

25 PointerRouter._dispatch (package:flutter/src/gestures/pointer_router.dart:98:12)

26 PointerRouter._dispatchEventToRoutes. (package:flutter/src/gestures/pointer_router.dart:143:9)

27 _LinkedHashMapMixin.forEach (dart:collection-patch/compact_hash.dart:617:13)

28 PointerRouter._dispatchEventToRoutes (package:flutter/src/gestures/pointer_router.dart:141:18)

29 PointerRouter.route (package:flutter/src/gestures/pointer_router.dart:127:7)

30 GestureBinding.handleEvent (package:flutter/src/gestures/binding.dart:460:19)

31 GestureBinding.dispatchEvent (package:flutter/src/gestures/binding.dart:440:22)

32 RendererBinding.dispatchEvent (package:flutter/src/rendering/binding.dart:337:11)

33 GestureBinding._handlePointerEventImmediately (package:flutter/src/gestures/binding.dart:395:7)

34 GestureBinding.handlePointerEvent (package:flutter/src/gestures/binding.dart:357:5)

35 GestureBinding._flushPointerEventQueue (package:flutter/src/gestures/binding.dart:314:7)

36 GestureBinding._handlePointerDataPacket (package:flutter/src/gestures/binding.dart:295:7)

37 _invoke1 (dart:ui/hooks.dart:167:13)

38 PlatformDispatcher._dispatchPointerDataPacket (dart:ui/platform_dispatcher.dart:341:7)

39 _dispatchPointerDataPacket (dart:ui/hooks.dart:94:31)

The AnimationController notifying status listeners was: AnimationController#7aef0(▶ 0.000)

aguilaair commented 1 year ago

Got it, will try with the example soon :)

hamzamon commented 1 year ago

Hi, any update?