artflutter / flutter_awesome_select

Forked from https://github.com/davigmacode/flutter_smart_select, updated legacy code, migrated to null safety and more. AwesomeSelect allows you to easily convert your usual form select or dropdown into dynamic page, popup dialog, or sliding bottom sheet with various choices input such as radio, checkbox, switch, chips, or even custom input. Supports single and multiple choice.
https://pub.dev/packages/flutter_awesome_select
MIT License
15 stars 33 forks source link

Modal scrolling throws exception #22

Open kirpit opened 1 year ago

kirpit commented 1 year ago

This is an awesome package, I really appreciate it.

There is an issue with the modal scrolling though, it keeps throwing an error in the background. It doesn't stop application from working but certainly doesn't feel okay. I'm using the latest flutter with the example from the repository.

% flutter --version
Flutter 3.3.2 • channel stable • https://github.com/flutter/flutter.git
Framework • revision e3c29ec00c (3 weeks ago) • 2022-09-14 08:46:55 -0500
Engine • revision a4ff2c53d8
Tools • Dart 2.18.1 • DevTools 2.15.0

I recorded a video on what's going on and how to reproduce it:

https://user-images.githubusercontent.com/1009931/193498698-42b1da85-858b-4deb-a30e-9d626dc9dd71.mov

Sorry, I have no idea about the problem, couldn't be much help but here is the stack trace. It keeps throwing the same errors as I scroll:

Performing hot restart...
Waiting for connection from debug service on Chrome...
Restarted application in 322ms.

======== 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 PrimaryScrollController. This ScrollController should be associated with the ScrollView that the Scrollbar is being applied to.A ScrollView with an Axis.vertical ScrollDirection on mobile platforms will automatically use the PrimaryScrollController if the user has not provided a ScrollController. To use the PrimaryScrollController explicitly, set ScrollView.primary to true for the Scrollable widget.

When the exception was thrown, this was the stack: 
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 266:49      throw_
packages/flutter/src/widgets/scrollbar.dart 1503:9                                <fn>
packages/flutter/src/widgets/scrollbar.dart 1527:14                               [_debugCheckHasValidScrollPosition]
packages/flutter/src/widgets/scrollbar.dart 1470:14                               [_validateInteractions]
packages/flutter/src/animation/listener_helpers.dart 240:19                       notifyStatusListeners
packages/flutter/src/animation/animation_controller.dart 822:7                    [_checkStatusChanged]
packages/flutter/src/animation/animation_controller.dart 756:5                    [_startSimulation]
packages/flutter/src/animation/animation_controller.dart 619:12                   [_animateToInternal]
packages/flutter/src/animation/animation_controller.dart 467:12                   forward
packages/flutter/src/widgets/scrollbar.dart 1863:37                               [_handleScrollNotification]
packages/flutter/src/widgets/notification_listener.dart 130:22                    onNotification
packages/flutter/src/widgets/framework.dart 3094:18                               dispatchNotification
packages/flutter/src/widgets/framework.dart 3097:13                               dispatchNotification
packages/flutter/src/widgets/framework.dart 3097:13                               dispatchNotification
packages/flutter/src/widgets/framework.dart 3097:13                               dispatchNotification
packages/flutter/src/widgets/framework.dart 4441:24                               dispatchNotification
packages/flutter/src/widgets/notification_listener.dart 60:13                     dispatch
packages/flutter/src/widgets/scroll_activity.dart 92:90                           dispatchScrollUpdateNotification
packages/flutter/src/widgets/scroll_position.dart 914:5                           didUpdateScrollPositionBy
packages/flutter/src/widgets/scroll_position_with_single_context.dart 223:7       pointerScroll
packages/flutter/src/widgets/scrollable.dart 742:16                               [_handlePointerScroll]
packages/flutter/src/gestures/pointer_signal_resolver.dart 90:7                   resolve
packages/flutter/src/gestures/binding.dart 466:29                                 handleEvent
packages/flutter/src/gestures/binding.dart 440:14                                 dispatchEvent
packages/flutter/src/rendering/binding.dart 337:11                                dispatchEvent
packages/flutter/src/gestures/binding.dart 395:7                                  [_handlePointerEventImmediately]
packages/flutter/src/gestures/binding.dart 357:5                                  handlePointerEvent
packages/flutter/src/gestures/binding.dart 314:7                                  [_flushPointerEventQueue]
packages/flutter/src/gestures/binding.dart 295:7                                  [_handlePointerDataPacket]
lib/_engine/engine/platform_dispatcher.dart 1183:13                               invoke1
lib/_engine/engine/platform_dispatcher.dart 244:5                                 invokeOnPointerDataPacket
lib/_engine/engine/pointer_binding.dart 147:39                                    [_onPointerData]
lib/_engine/engine/pointer_binding.dart 372:14                                    [_handleWheelEvent]
lib/_engine/engine/pointer_binding.dart 672:7                                     <fn>
lib/_engine/engine/pointer_binding.dart 362:43                                    <fn>
lib/_engine/engine/pointer_binding.dart 203:80                                    <fn>
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart 334:14  _checkAndCall
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart 339:39  dcall
The AnimationController notifying status listeners was: AnimationController#6245a(▶ 0.000)
====================================================================================================

======== 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 PrimaryScrollController. This ScrollController should be associated with the ScrollView that the Scrollbar is being applied to.A ScrollView with an Axis.vertical ScrollDirection on mobile platforms will automatically use the PrimaryScrollController if the user has not provided a ScrollController. To use the PrimaryScrollController explicitly, set ScrollView.primary to true for the Scrollable widget.

When the exception was thrown, this was the stack: 
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 266:49      throw_
packages/flutter/src/widgets/scrollbar.dart 1503:9                                <fn>
packages/flutter/src/widgets/scrollbar.dart 1527:14                               [_debugCheckHasValidScrollPosition]
packages/flutter/src/widgets/scrollbar.dart 1470:14                               [_validateInteractions]
packages/flutter/src/animation/listener_helpers.dart 240:19                       notifyStatusListeners
packages/flutter/src/animation/animation_controller.dart 822:7                    [_checkStatusChanged]
packages/flutter/src/animation/animation_controller.dart 838:5                    [_tick]
packages/flutter/src/scheduler/ticker.dart 249:12                                 [_tick]
packages/flutter/src/scheduler/binding.dart 1175:15                               [_invokeFrameCallback]
packages/flutter/src/scheduler/binding.dart 1079:11                               <fn>
dart-sdk/lib/_internal/js_dev_runtime/private/linked_hash_map.dart 21:13          forEach
packages/flutter/src/scheduler/binding.dart 1077:16                               handleBeginFrame
packages/flutter/src/scheduler/binding.dart 994:5                                 [_handleBeginFrame]
lib/_engine/engine/platform_dispatcher.dart 1183:13                               invoke1
lib/_engine/engine/platform_dispatcher.dart 198:5                                 invokeOnBeginFrame
lib/_engine/engine/initialization.dart 186:45                                     <fn>
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart 334:14  _checkAndCall
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart 339:39  dcall
The AnimationController notifying status listeners was: AnimationController#6245a(⏭ 1.000; paused)
====================================================================================================

======== 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 PrimaryScrollController. This ScrollController should be associated with the ScrollView that the Scrollbar is being applied to.A ScrollView with an Axis.vertical ScrollDirection on mobile platforms will automatically use the PrimaryScrollController if the user has not provided a ScrollController. To use the PrimaryScrollController explicitly, set ScrollView.primary to true for the Scrollable widget.

When the exception was thrown, this was the stack: 
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 266:49  throw_
packages/flutter/src/widgets/scrollbar.dart 1503:9                            <fn>
packages/flutter/src/widgets/scrollbar.dart 1527:14                           [_debugCheckHasValidScrollPosition]
packages/flutter/src/widgets/scrollbar.dart 1470:14                           [_validateInteractions]
packages/flutter/src/animation/listener_helpers.dart 240:19                   notifyStatusListeners
packages/flutter/src/animation/animation_controller.dart 822:7                [_checkStatusChanged]
packages/flutter/src/animation/animation_controller.dart 756:5                [_startSimulation]
packages/flutter/src/animation/animation_controller.dart 619:12               [_animateToInternal]
packages/flutter/src/animation/animation_controller.dart 501:12               reverse
packages/flutter/src/widgets/scrollbar.dart 1663:37                           <fn>
dart-sdk/lib/_internal/js_dev_runtime/private/isolate_helper.dart 48:19       internalCallback
The AnimationController notifying status listeners was: AnimationController#6245a(◀ 1.000)
====================================================================================================

======== 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 PrimaryScrollController. This ScrollController should be associated with the ScrollView that the Scrollbar is being applied to.A ScrollView with an Axis.vertical ScrollDirection on mobile platforms will automatically use the PrimaryScrollController if the user has not provided a ScrollController. To use the PrimaryScrollController explicitly, set ScrollView.primary to true for the Scrollable widget.

When the exception was thrown, this was the stack: 
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 266:49      throw_
packages/flutter/src/widgets/scrollbar.dart 1503:9                                <fn>
packages/flutter/src/widgets/scrollbar.dart 1527:14                               [_debugCheckHasValidScrollPosition]
packages/flutter/src/widgets/scrollbar.dart 1470:14                               [_validateInteractions]
packages/flutter/src/animation/listener_helpers.dart 240:19                       notifyStatusListeners
packages/flutter/src/animation/animation_controller.dart 822:7                    [_checkStatusChanged]
packages/flutter/src/animation/animation_controller.dart 756:5                    [_startSimulation]
packages/flutter/src/animation/animation_controller.dart 619:12                   [_animateToInternal]
packages/flutter/src/animation/animation_controller.dart 467:12                   forward
packages/flutter/src/widgets/scrollbar.dart 1863:37                               [_handleScrollNotification]
packages/flutter/src/widgets/notification_listener.dart 130:22                    onNotification
packages/flutter/src/widgets/framework.dart 3094:18                               dispatchNotification
packages/flutter/src/widgets/framework.dart 3097:13                               dispatchNotification
packages/flutter/src/widgets/framework.dart 3097:13                               dispatchNotification
packages/flutter/src/widgets/framework.dart 3097:13                               dispatchNotification
packages/flutter/src/widgets/framework.dart 4441:24                               dispatchNotification
packages/flutter/src/widgets/notification_listener.dart 60:13                     dispatch
packages/flutter/src/widgets/scroll_activity.dart 92:90                           dispatchScrollUpdateNotification
packages/flutter/src/widgets/scroll_position.dart 914:5                           didUpdateScrollPositionBy
packages/flutter/src/widgets/scroll_position_with_single_context.dart 223:7       pointerScroll
packages/flutter/src/widgets/scrollable.dart 742:16                               [_handlePointerScroll]
packages/flutter/src/gestures/pointer_signal_resolver.dart 90:7                   resolve
packages/flutter/src/gestures/binding.dart 466:29                                 handleEvent
packages/flutter/src/gestures/binding.dart 440:14                                 dispatchEvent
packages/flutter/src/rendering/binding.dart 337:11                                dispatchEvent
packages/flutter/src/gestures/binding.dart 395:7                                  [_handlePointerEventImmediately]
packages/flutter/src/gestures/binding.dart 357:5                                  handlePointerEvent
packages/flutter/src/gestures/binding.dart 314:7                                  [_flushPointerEventQueue]
packages/flutter/src/gestures/binding.dart 295:7                                  [_handlePointerDataPacket]
lib/_engine/engine/platform_dispatcher.dart 1183:13                               invoke1
lib/_engine/engine/platform_dispatcher.dart 244:5                                 invokeOnPointerDataPacket
lib/_engine/engine/pointer_binding.dart 147:39                                    [_onPointerData]
lib/_engine/engine/pointer_binding.dart 372:14                                    [_handleWheelEvent]
lib/_engine/engine/pointer_binding.dart 672:7                                     <fn>
lib/_engine/engine/pointer_binding.dart 362:43                                    <fn>
lib/_engine/engine/pointer_binding.dart 203:80                                    <fn>
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart 334:14  _checkAndCall
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart 339:39  dcall
The AnimationController notifying status listeners was: AnimationController#6245a(▶ 0.000)
====================================================================================================

======== 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 PrimaryScrollController. This ScrollController should be associated with the ScrollView that the Scrollbar is being applied to.A ScrollView with an Axis.vertical ScrollDirection on mobile platforms will automatically use the PrimaryScrollController if the user has not provided a ScrollController. To use the PrimaryScrollController explicitly, set ScrollView.primary to true for the Scrollable widget.

When the exception was thrown, this was the stack: 
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 266:49      throw_
packages/flutter/src/widgets/scrollbar.dart 1503:9                                <fn>
packages/flutter/src/widgets/scrollbar.dart 1527:14                               [_debugCheckHasValidScrollPosition]
packages/flutter/src/widgets/scrollbar.dart 1470:14                               [_validateInteractions]
packages/flutter/src/animation/listener_helpers.dart 240:19                       notifyStatusListeners
packages/flutter/src/animation/animation_controller.dart 822:7                    [_checkStatusChanged]
packages/flutter/src/animation/animation_controller.dart 838:5                    [_tick]
packages/flutter/src/scheduler/ticker.dart 249:12                                 [_tick]
packages/flutter/src/scheduler/binding.dart 1175:15                               [_invokeFrameCallback]
packages/flutter/src/scheduler/binding.dart 1079:11                               <fn>
dart-sdk/lib/_internal/js_dev_runtime/private/linked_hash_map.dart 21:13          forEach
packages/flutter/src/scheduler/binding.dart 1077:16                               handleBeginFrame
packages/flutter/src/scheduler/binding.dart 994:5                                 [_handleBeginFrame]
lib/_engine/engine/platform_dispatcher.dart 1183:13                               invoke1
lib/_engine/engine/platform_dispatcher.dart 198:5                                 invokeOnBeginFrame
lib/_engine/engine/initialization.dart 186:45                                     <fn>
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart 334:14  _checkAndCall
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/operations.dart 339:39  dcall
The AnimationController notifying status listeners was: AnimationController#6245a(⏭ 1.000; paused)
====================================================================================================

======== 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 PrimaryScrollController. This ScrollController should be associated with the ScrollView that the Scrollbar is being applied to.A ScrollView with an Axis.vertical ScrollDirection on mobile platforms will automatically use the PrimaryScrollController if the user has not provided a ScrollController. To use the PrimaryScrollController explicitly, set ScrollView.primary to true for the Scrollable widget.

When the exception was thrown, this was the stack: 
dart-sdk/lib/_internal/js_dev_runtime/private/ddc_runtime/errors.dart 266:49  throw_
packages/flutter/src/widgets/scrollbar.dart 1503:9                            <fn>
packages/flutter/src/widgets/scrollbar.dart 1527:14                           [_debugCheckHasValidScrollPosition]
packages/flutter/src/widgets/scrollbar.dart 1470:14                           [_validateInteractions]
packages/flutter/src/animation/listener_helpers.dart 240:19                   notifyStatusListeners
packages/flutter/src/animation/animation_controller.dart 822:7                [_checkStatusChanged]
packages/flutter/src/animation/animation_controller.dart 756:5                [_startSimulation]
packages/flutter/src/animation/animation_controller.dart 619:12               [_animateToInternal]
packages/flutter/src/animation/animation_controller.dart 501:12               reverse
packages/flutter/src/widgets/scrollbar.dart 1663:37                           <fn>
dart-sdk/lib/_internal/js_dev_runtime/private/isolate_helper.dart 48:19       internalCallback
The AnimationController notifying status listeners was: AnimationController#6245a(◀ 1.000)
====================================================================================================
guilherme-diniz commented 1 year ago

Will this be fixed?

Hamza3620 commented 1 year ago

Any update on the fix? Awaiting response. Thanks!